Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have used LET various times for creating variables inside the script.
However, today when I am doing same thing variable is only not getting created.
Dont know how this silly thing is happening. Please help.
Temp:
LOAD
Max(order_date) as MaxDate,
Min(order_date) as MinDate
FROM
$(vQVD)sales.QVD
(qvd);
LET vMaxDate = date(peek(‘MaxDate’));
LET vMinDate = date(peek(‘MinDate’));
Drop Table Temp;
Regards
Bhumika kandpal
your code Looks good, so I woner if the Temp table was created.
Did you check that?
Hello,
thanks for your prompt reply.
I tested using LET in the start of the application with eg: LET a='key';
its not working either.
Regards
What does not work?
Does the variable a have a content?
Is the variable vQVD populated?
Is the $(vQVD)sales.QVD existing?
Is the TempTable created?
Does the field order_date have values?
You missed to specify the table from which peek() should grab the values - this is mandatory if peek() is used outside of a load (often it worked without it because peek() used then this last used table but if there is any other load-statement after the min/max table it will fail):
LET vMaxDate = date(peek(‘MaxDate’, 0, 'Temp'));
LET vMinDate = date(peek(‘MinDate’, 0, 'Temp'));
- Marcus