Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a table of data and I get incremental updates to this data every day. I am trying to update the original table with updates. Please see the attached example.
Original | ||
Table1 | ||
A | B | |
1 | aa | |
2 | cc | |
3 | ee | |
Updates | ||
Table2 | ||
A | B | |
1 | xx | |
4 | yy | |
Expected Table | ||
Table1 | ||
A | B | |
1 | xx | |
2 | cc | |
3 | ee | |
4 | yy |
Thanks for the help.
If field A is the key, a load like this can work:
Test:
SQL SELECT
A,
........
FROM Updates;
CONCATENATE
LOAD * from Original where not exists (A);
STORE Test into Original.QVD;
drop table test;
--Arun
Hi,
see the attached example for the code you need.
First: inital load of your data (you need a QVD folder for this example to store the qvd-file in).
Second: modify the data in the excel table and remove the comments ("//") from step 2 and 3 in the script
Third you will have your updated table if the script runs without errors.
Good luck!
Rainer