Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I need some help! I have two Tables :
Table A:
ID Value
1 1000
2 3000
4 4000
Table B:
ID Value
2 3000
I need to be able to do a Resident load of all the 'ID's' from 'Table A' where they do not exist in Table B! Is this possible?
In this case ID's 1 & 4 would be returned.
Can any share on any thoughts on a sample load script which would achieve this?
Thanks
Table A:
ID Value
1 1000
2 3000
4 4000
Table B:
ID Value
2 3000
TABLE_B:
LOAD ID AS ID_B, VALUE
FROM Table B
TABLE_A:
LOAD ID, VALUE
FROM Table a
WHERE NOT EXISTS(ID_B, ID);
Table A:
ID Value
1 1000
2 3000
4 4000
Table B:
ID Value
2 3000
TABLE_B:
LOAD ID AS ID_B, VALUE
FROM Table B
TABLE_A:
LOAD ID, VALUE
FROM Table a
WHERE NOT EXISTS(ID_B, ID);
Change the column name in Table B to ID_TableB and then try something like the following:
Table C:
Load ID, Value
Resident [Table A]
Where not exists(ID,ID_TableB);
Regards