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

Help with LET variable

Hello

probably doing something not right but following code throwing error "ErrorSource: OraOLEDB, ErrorMsg: ORA-00933: SQL command not properly ended". I am trying to grab data from Oracle table

Let vNOWTIME =  Timestamp(Now()-1);

OLEDB CONNECT32 TO [xxxxxxxxxxxxxxxxx);

SQL SELECT

    "UPD_DT",

     CUSTOMER,
     PRODID,
     PROD,
     PRDNM

   

FROM "XE256"."ORA_78998465"

WHERE "UPD_DT" >= $(vNOWTIME);

UPD_DT has a timestamp where data was last updated.

When i replace statement "WHERE "UPD_DT" >= $(vNOWTIME);" with WHERE "UPD_DT" >= '01/12/2014';" it works fine. Seems like i am not using LET expression correctly?

10 Replies
Anonymous
Not applicable
Author

You're welcome. Glad I could help. Please, mark the post as answered so others will that have a similar problem can find the answer more easily.

Cheers!