I use this query to marge two tables:
MERGE into tst.tableD D using tst.tableA A ON A.id=D.id AND A.c1_ = D.c1_ --- CONSTRAINT UC_c1 UNIQUE (id,c1_) WHEN MATCHED THEN UPDATE SET c2_=A.c2_ ,c3_=A.c3_ WHEN NOT MATCHED THEN INSERT (id, c1_, c2_, c3_, C4) VALUES ( A.id, A.c1_, A.c2_, A.c3_, A.C4)
my questions are:
1.I need to marge data from CSV files instead of using table A,I load data to temp table (table A) and then do the
merge query. there is a better solution without the temp table?
2.in table A and table D the is lot of column more then 290 and in the same name ,ther is a better slounig
in the update part instead : SET c2_=A.c2_ ,c3_=A.c3_ ........c289=A.c298,c290=A.c290?
Thank you all!!