Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

LOAD QVD where clause + qlik variables

Hey guys

I'm implementing incremental load, but i'm having problems with the load where clause when i use variables

LET start_date = '2015-01-05';

LET end_date = '2015-01-07';

LOAD

     field1,

     field2,

     date,

     field3,

     ...

FROM

     [qvdpath\qvdfile.qvd] (qvd)

WHERE

     (date < $(start_date)

     and date > $(end_date));


And it loads if i Load like:

LOAD

     field1,

     field2,

     date,

     field3,

     ...

FROM

     [qvdpath\qvdfile.qvd] (qvd)

WHERE

     (date < '2015-01-05'

     and date > '2015-01-07');

I'm using that to load the QVD without some dates, so i can concatenate updated versions (reload dates from qvd)


Ty!

1 Solution

Accepted Solutions
effinty2112
Master
Master

Hi Victor,

Try

WHERE

     (date < '$(start_date)'

     and date > '$(end_date)');


Cheers


Andrew

View solution in original post

5 Replies
jmvilaplanap
Specialist
Specialist

Hi,

Maybe is because QV is evaluating the date and writing it as a number. Try with SET.

let and set difference

Regards

effinty2112
Master
Master

Hi Victor,

Try

WHERE

     (date < '$(start_date)'

     and date > '$(end_date)');


Cheers


Andrew

Not applicable
Author

Hey Jose

Changed to SET, but it still ignore it and loads full qvd

Not applicable
Author

Hell yeah man!

Ty!

Colin-Albert
Partner - Champion
Partner - Champion

Use makedate as this will generate a correct numeric date value

LET start_date = makedate(2015, 1, 5) ;

LET end_date = makedate(2015, 1, 7);