Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have two tables to load in my application. The requirement is to load only the uncommon records that exist in Table 2 .The records need not to be in my application.
Please find the below script and suggest how can I achieve this result.
a:
LOAD * INLINE [
ID, Name
1, A
2, B
3, C
4, D
5, E
];
B:
LOAD * INLINE [
ID, Name
1, A
2, B
3, C
4, D
5, E
6, F
7, G
8, H
] ;
Output : I need to have only IDs- 6,7,8 in my application rest all the common IDs to be dropped.
Thanks
Ishika
Hi,
Please try below script.
a:
LOAD * INLINE [
ID, Name
1, A
2, B
3, C
4, D
5, E
];
NoConcatenate
B:
LOAD * WHERE NOT EXISTS ( ID,ID);
LOAD * INLINE [
ID, Name
1, A
2, B
3, C
4, D
5, E
6, F
7, G
8, H
] ;
DROP TABLE a;
Hope this helps you.
BR,
Saurabh
Hi,
Adding to above can try something like mentioned below:
Main1:
LOAD * INLINE [
ID, Name
1, A
2, B
3, C
4, D
5, E
];
join
Main2:
LOAD * INLINE [
ID1, Name
1, A
2, B
3, C
4, D
5, E
6, F
7, G
8, H
];
NoConcatenate
Main:
Load *
Resident Main1
where IsNull(ID) or IsNull(ID1);
Drop Table Main1;
PFA sample app for your reference: