Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
Please see attached document, by processing transactions I moving on from one job number to other, I would like to know I can map from first line to all related transactions.
Please advise
Sorry but what is the desired output that you are looking for?
Hi I need to add trace column, trace should represent fist job id even we move product to new stage (new job id).
Thanks
Try this,
DATA:
LOAD * INLINE [
PROD, TRAN TYPE, LOT NO, QTY, JOB ID
P001, ISSUE, 7000, -100, J0001
K001, BOOK, T00001, 50, J0001
K001, ISSUE, T00001, -50, J0001
L001, BOOK, T00002, 60, J0001
L001, ISSUE, T00002, -60, J0002
Y001, BOOK, T00003, 150, J0002
];
left join (DATA)
LOAD Distinct
PROD,
PROD AS PROD2,
[JOB ID] as TRACE
Resident DATA
WHERE NOT Exists(PROD2,PROD)
ORDER BY PROD,[JOB ID] ASC
;
drop field PROD2;
are looking for this?