Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have two tables :
Table 1:
Key
Reason
Table 2:
Key
Reason
I want to write a script that would concatenate Table 2 (into Table 1) ONLY when the key in Table 2 is not present in Table 1.
Thanks in advance for any help.
Table 1:
Load
Key
Reason
From TableName....
Concatenate
Table 2:
Load
Key
Reason
From TableName
Where Not Exists(Key)
Table 1:
Load
Key
Reason
From TableName....
Concatenate
Table 2:
Load
Key
Reason
From TableName
Where Not Exists(Key)
Try with Where NOT Exists statement
The below is example load script for understand how it works
Ex:-
Table1:
LOAD * Inline
[
Key,Reason
1,N
2,Y
];
Concatenate
Table2:
LOAD * Inline
[
Key,Reason
3,Y
] Where not Exists(Key);