Hi,
Is it possible to UPSERT data in one table based on data in a different table?
Here is the scenario:
CREATETABLE T (COL INT, VAL INT);
INSERTINTO T VALUES (1, 1);
INSERTINTO T VALUES (2, 2);
CREATETABLE u (COL INT, VAL INT);
INSERTINTO u VALUES (1, 4);
INSERTINTO u VALUES (3, 3);
UPSERT something like this:
UPSERT T
VALUES (U.COL, U.VAL)
FROM T, U
WHERE T.COL=U.COL;
What I finally want to see in the Table T is
1,4
2,2
3,3
Thanks,
Varun Vemala