Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I'am looking for use in my loading SQL statement, a date stored in a variable.
I have in my script sheet :
1.SQL which fetch DT_MAX
Select
to_char(max(DH_START),'DD/MM/YYYY') as DT_MAX
from MY_TABLE;
2.Assignment of DT_MAX in a variable
SET V_DT_END=DT_MAX;
3.Use of V_DT_END in my SQL statement
Select xxx
from xxx
where DT between '01/01/2016' and $(V_DT_END)
The third step don't works. If i write between '01/01/2016' and '14/07/2017', it works. The problem is '. How to reproduce 'DT' with V_DT_END??
I have tried différents ways but the issue remains.
Thanks
No Jean, because Peek('DT_MAX') -> is required from Peek() function
and '$(V_DT_END)' needs according SQL syntax.
Regards,
Antonio
When you use this variable in a textbox what value can you see?