Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Where condition Not working with QVD Load

Facing issues,while using where condition in QVD load,

LET vDate = MakeDate(Year(Today()),Month(Today()),1);

Load * z,y,z,EndDate

from  FROM [..\..\Shared QVD\test.qvd] (qvd)

where  EndDate >= $(vDate)

13 Replies

Re: Where condition Not working with QVD Load

Why don't you try this:

Load * z,y,z,EndDate

FROM [..\..\Shared QVD\test.qvd] (qvd)

where  EndDate >= Date(Today());

Re: Where condition Not working with QVD Load

Or this if you want from the starting of the month:

Load * z,y,z,EndDate

FROM [..\..\Shared QVD\test.qvd] (qvd)

Where  EndDate >= Date(MonthStart(Today()));

hrlinder
Honored Contributor

Re: Where condition Not working with QVD Load

load without where condition and then load from resident table using where

TEST:

Load ..

from ..qvd

TEST1:

noconcatenate load *

resident TEST

where Endate>=$(vDate)

drop table TEST

loading from a qvd without where clause will be done by an optimized load which is much faster

(upto 10times faster)

Not applicable

Re: Where condition Not working with QVD Load

Unfortunately its not working....Is there any issue with the date format of End Date?

Re: Where condition Not working with QVD Load

Yes how does your EndDate Look? Can you share a screenshot of your EndDate data?

Not applicable

Re: Where condition Not working with QVD Load

Capture.JPG

Re: Where condition Not working with QVD Load

Try this:

Load * z,y,z,EndDate

FROM [..\..\Shared QVD\test.qvd] (qvd)

where Date(Date#(EndDate, 'MM/DD/YYYY')) >= Date(Today());

MVP
MVP

Re: Where condition Not working with QVD Load

Often comparing dates as formatted dates and not as numerical dates can be quite hard to get working correctly.

Try to convert the dates to numerical dates:

LET vDate = MonthStart( Today() );

LET vNumDate = Num( vDate );

LOAD

     y,

     z,

     EndDate

FROM [..\..\Shared QVD\test.qvd] (qvd)

WHERE  Num(EndDate) >= $(vNumDate);

mov
Esteemed Contributor III

Re: Where condition Not working with QVD Load

Try

where  EndDate >= '$(vDate)'

Community Browser