Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to get get the last date for each part number received into seperate field in the load scripTt what is the best way to go about this ?
You could do as in script below. First pick out the max date per part and then join in the qty for that date.
Data:
Load
part,
Max(date) as date
From
EXCEL.xlsx (...)
Group by
part
;
LEFT JOIN (Data)
LOAD
part,
date,
qty
FROM Excel.xlsx (...);
Thanks for that but what if I wanted to just have the max date for that part only with the qty ?
How would I do that ?
You could do as in script below. First pick out the max date per part and then join in the qty for that date.
Data:
Load
part,
Max(date) as date
From
EXCEL.xlsx (...)
Group by
part
;
LEFT JOIN (Data)
LOAD
part,
date,
qty
FROM Excel.xlsx (...);