Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a quick question.I am able to create a variable using variable overview but unable to create it using the script. I know it is silly question. Just wanted to know why I am unable to create in the script.
Calculation Used:
vmaxdate = max(Date)
Thanks in advance!
Best Regards,
Varun Reddy
Two reasons
If, for instance, field Date is present in a resident table called Calendar, you better use something like this:
MinMaxTable:
LOAD max(Date) AS vMaxDate // Creates a single row with a single value
RESIDENT Calendar;
LET vmaxdate = peek('vMaxDate'); // peek into the table and get that single value
DROP Table MinMaxTable;
Best,
Peter
Two reasons
If, for instance, field Date is present in a resident table called Calendar, you better use something like this:
MinMaxTable:
LOAD max(Date) AS vMaxDate // Creates a single row with a single value
RESIDENT Calendar;
LET vmaxdate = peek('vMaxDate'); // peek into the table and get that single value
DROP Table MinMaxTable;
Best,
Peter
Thanks Peter,
Best Regards,
Varun
Just use SET statement:
Set vmaxdate = max(Date);
Set vmaxdate2 = '=max(Date)';
Set vmaxdate3 = =max(Date);