Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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!
Hi Victor,
Try
WHERE
(date < '$(start_date)'
and date > '$(end_date)');
Cheers
Andrew
Hi,
Maybe is because QV is evaluating the date and writing it as a number. Try with SET.
Regards
Hi Victor,
Try
WHERE
(date < '$(start_date)'
and date > '$(end_date)');
Cheers
Andrew
Hey Jose
Changed to SET, but it still ignore it and loads full qvd
Hell yeah man!
Ty!
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);