Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have two Q VD files (table1, table2) with the same column names, and I would like to append them into a single table called "final_table". The append operation should only occur when the primary keys do not match from both tables. However, with the current code, I am only seeing IDs from table1 appear, and IDs from table2 are not being included.
I would appreciate your guidance in resolving this issue.
LOAD *
From table1;
Concatenate LOAD * FROM table2
WHERE NOT Exists(id);
Try
Table1:
LOAD ID as LookUpID
...
FROM abc;
Concatenate
Table2:
LOAD ID
...
FROM xyz;
NoConcatenate
Final_Table:
LOAD * Resident
Where not Exists(IDToCheck,ID);
DROP Table Table1;
DROP Field LookUpID;
Try
Table1:
LOAD ID as LookUpID
...
FROM abc;
Concatenate
Table2:
LOAD ID
...
FROM xyz;
NoConcatenate
Final_Table:
LOAD * Resident
Where not Exists(IDToCheck,ID);
DROP Table Table1;
DROP Field LookUpID;
Thanks for the help it worked.