Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Loading QVD data with a where Date clause works on a single file but not mulitple

Hi - I'm need to import a range of data from various QVDs that is less than a certain date, defined by a variable.  The script works when I bring in a singular file, but not when I import multiple files.

Variables :

LET vMinDate = Date(Today()-7,'YYYYMMDD');   //Used elsewhere in the script

LET vMinDate2 = num(vMinDate); // Used for this query

So this works and brings in only August data prior to the vMinDate variable :

YHMN:

Load *

where [Date] < '$(vMinDate2)';

Load * from $(vQVDDirectory)$(vYHMNFile)20150801_20150830.qvd (qvd)   // This is a specific file with August data

This doesn't  - it runs but brings in all data up to whatever the lastest data is in the QVDs(in this case yesterday).

YHMN:

Load *

where [Date] < '$(vMinDate2)';

Load * from $(vQVDDirectory)$(vYHMNFile)*.qvd (qvd)  /  This loads all files including the one specified in the query above

All QVDs have been created using the same extraction script and are just the same data broken into months.

So what do I need to add or adjust to make the second script run ?  This is what I need - all historical data but only up to the variable date (for explanation why, the data after this date will be replaced with a new data run each day).

Regards,

Dave

1 Solution

Accepted Solutions
jagan
Luminary Alumni
Luminary Alumni

Hi Dave,

Try like this

Temp:

Load * from $(vQVDDirectory)$(vYHMNFile)*.qvd (qvd)

YHMN:

Noconcatenate

Load *

RESIDENT

where [Date] < '$(vMinDate2)';

DROP TABLE Temp;

Regards,

Jagan.

View solution in original post

2 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi Dave,

Try like this

Temp:

Load * from $(vQVDDirectory)$(vYHMNFile)*.qvd (qvd)

YHMN:

Noconcatenate

Load *

RESIDENT

where [Date] < '$(vMinDate2)';

DROP TABLE Temp;

Regards,

Jagan.

Anonymous
Not applicable
Author

Works perfectly, thanks 🙂