Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
newqlikie
Creator
Creator

Problem with loadscript (WHERE-command with date-function)

Hi everybody,

I have following script:

LET vDate = addmonths(num(today()), -7);

LOAD *, JATEIHNR&'.'&JATEIUNR as TNNR00;

SQL SELECT JATEIHNR,

    JATEIUNR,

    JAAUFNR as "Auftragsnummer",

    JARECDAT,

    JAARTNR as DUREF,

    JALIEMEN

FROM QS36F.DLSJA

    WHERE JALIEMEN>0 and JARECDAT>$(vDate);

When I run the script, i get following script error:

Scriptproblem.JPG

The prompted date (yellow highlited) is absolutely ok, but I get that error.

What do I do wrong?

Thanks for your help.

Regards

     NewQlikie

1 Solution

Accepted Solutions
sbaldwin
Partner - Creator III
Partner - Creator III

Hi, can't quite make out the error but i have had these kind of errors with dates, try to add quotes round your dollar expansion ie:

WHERE JALIEMEN>0 and JARECDAT>'$(vDate)';

this is also assuming your DB accepts the format you are passing it, again can't properly make out the error to confirm.

Thanks

Steve

View solution in original post

2 Replies
sbaldwin
Partner - Creator III
Partner - Creator III

Hi, can't quite make out the error but i have had these kind of errors with dates, try to add quotes round your dollar expansion ie:

WHERE JALIEMEN>0 and JARECDAT>'$(vDate)';

this is also assuming your DB accepts the format you are passing it, again can't properly make out the error to confirm.

Thanks

Steve

newqlikie
Creator
Creator
Author

Hi Steve,

thank you very much.

"Sometimes the easiest way is direct in front of you, but you can not see it!"