Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I want to determine the max date for my incremental load. But when I am using Peek function the variable is showing wrong format.
in source date is in below format:
My Script is:
Last_Date:
LOAD
Date (max(action_date$)) as MaxActionDate
FROM
(qvd);
let vMaxDate = Date(peek('MaxActionDate',0,'Last_Date'));
MaxActionDate is showing in right format:
But Variable vMaxDate is showing in wrong format:
Could you please help to get this correct.
Thanks,
Sarif
I hope you are using your variable without the dollar sign expansion on the front end...
Use it as =vMaxDate instead of =$(vMaxDate)
Instead of Let use Set
Set vMaxDate = ........
Try like this
LOAD Max(action_date$) as MaxActionDate
FROM
(qvd);
LET vMaxDate = Date(Peek('MaxActionDate',0,'Last_Date'));
Hi Mohammad,
May it will help you:
Temp:
Load
min(TransactionDate) as minDate,
max(TransactionDate) as maxDate
Resident LinKTable;
Let varMinDate = Num(Peek('minDate', 0, 'Temp'));
Let varMaxDate = Num(Peek('maxDate', 0, 'Temp'));
DROP Table Temp;
Thanks,
Arvind Patil
Hello Sunny ,
This is also not working. I am getting result like below:
I hope you are using your variable without the dollar sign expansion on the front end...
Use it as =vMaxDate instead of =$(vMaxDate)
try this
Last_Date:
LOAD
Date(floor(max(action_date$))) as MaxActionDate
FROM
(qvd);
let vMaxDate = peek('MaxActionDate',0,'Last_Date');
Date(maxActionDate);
Or
Timestamp(maxActionDate)
Regards,
Prashant
okk..it is working..
what happens if we put $?
6/30/2017 is evaluated as 6 divided by 30 divided by 2017....