Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
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
sunny_talwar

Why don't you try this:

Load * z,y,z,EndDate

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

where  EndDate >= Date(Today());

sunny_talwar

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()));

Anonymous
Not applicable
Author

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
Author

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

sunny_talwar

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

Not applicable
Author

Capture.JPG

sunny_talwar

Try this:

Load * z,y,z,EndDate

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

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

petter
Partner - Champion III
Partner - Champion III

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);

Anonymous
Not applicable
Author

Try

where  EndDate >= '$(vDate)'