Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i have these lines in an excel:
id, value, status, country
1, 100, CER, NL
1, 200, CEP, NL
1, 500, CQW, NL
2, 400, FEE, BE
3, 500, ERT, CZ
3, 600, RTP, CZ
3, 200, RTP, CZ
what i want is from each unique id .. the first hit..
so.. this will give me 3 records. I think i first have to load the complete table .. and the do a RESIDENT load with peek. or thinking about a rowno/previous solution. any suggestions?
Here you go:
Tab:
LOAD * INLINE [
id, value, status, country
1, 100, CER, NL
1, 200, CEP, NL
1, 500, CQW, NL
2, 400, FEE, BE
3, 500, ERT, CZ
3, 600, RTP, CZ
3, 200, RTP, CZ
];
NewTab:
LOAD id as new_id,
value, status, country
RESIDENT Tab
where id <> peek('new_id');
drop table Tab;
Here you go:
Tab:
LOAD * INLINE [
id, value, status, country
1, 100, CER, NL
1, 200, CEP, NL
1, 500, CQW, NL
2, 400, FEE, BE
3, 500, ERT, CZ
3, 600, RTP, CZ
3, 200, RTP, CZ
];
NewTab:
LOAD id as new_id,
value, status, country
RESIDENT Tab
where id <> peek('new_id');
drop table Tab;
Thanks for your reply .. this cant be done in the initial load right? i need the second table and drop the first
This is correct Amien.