Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a data set like this below:
I want to write LOAD script, so that it would fetch the Max(CONFIRM_CREATE_DTE) and I will have one record: 02/14/2012.
I have already tried using MAX() and First Sorted Value, but in vain.
Could someone please help here?
Depending on your data amount I would add an extra step for performance otherwise you can skip TempDates.
TempDates:
Load distinct CONFIRM_CREATE_DTE
resident YOURTABLE;
VarTemp:
LOAD
Max(CONFIRM_CREATE_DTE) as MaxDate
Resident TempDates;
LET vMaxDate = peek('MaxDate');
Drop Tables TempDates,VarTemp;
Now you have on variable with your value. if you want it in your table do a resident load again and add your variable.