Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have two tables with and ID and a value column. Table1 and Table2
Need to concatentate these tables into one BUT if any IDs exist in Table2 that already exist in Table1, exclude from concatenating.
This is needed because data in Table1 is clean so records are correct.
Table2 has new records which I want but also ones with the same ID as Table1. The Value column in this table may be incorrect for the IDN so I do not want to load this record.
How can I do this?
Use condition exists():
Table1:
LOAD
ID
...
CONCATENATE (Table1) LOAD DISTINCT
...
RESIDENT Table2
where not exists(ID)
Thanks for the info. I could not use CONCATENATE because I attempted to drop the secondary table later to clear synthetic keys and the records from this table disappeared, even in the concatenated table.
I used ADD LOAD instead and it appears to be working the way I need it to.
Thanks for the help.