Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have to use variable in SQL. This variable fetch the max Date of a field (DH_START). So, when i perform my SQL query on Oracle, it works.
E.g the max date is 30/06/2018 23:52:00
The part of my SQL query using this is :
WHERE DH_START >= TO_DATE('30/06/2018 23:52:00', 'DD/MM/YYYY HH24:MI:SS')
The target is that the same query works in my Qlikview SQL statement.
But, the following statement don't works:
WHERE DH_START > TO_DATE($(Max_DH_2),'DD/MM/YYYY HH24:MI:SS')
I use :
SET Max_DH=max(DH_START);
SET Max_DH_2=chr(39)&$(Max_DH)&chr(39);
When i use $(Max_DH_2) in a text box, it returns '30/06/2018 23:52:00'. So, $(Max_DH_2) should works.
What i have missed?
Thanks
You cannot use Max() function directly in the variable... you will need to use Max() in a load statement and then peek its value into the variable... just like you would do for a master calendar script
You cannot use Max() function directly in the variable... you will need to use Max() in a load statement and then peek its value into the variable... just like you would do for a master calendar script
Thanks it works