goodfriend
Programmer
I have the following problem:
There are 2 tables which are identical COLA being primary key:-
Table A Table B
---------------- ----------------
COLA COLB COLC COLA COLB COLC
1 ABC XYZ 1 ABC XYZ
2 PQR DEF 2 RPQ FDE
Except that Table A has Changed information which I need to
Sync with Table B at the end of the Day.
I am trying to use SQL to solve the above problem.
IS there anyway in Oracle to execute one SQL and acheive the above, I am aware that finally I can delete the record and reinsert it, however, I would like to do it using a update statement.
I have tried the following without success:
UPDATE B set (COLB, COLC) = ( select COLB, COLC from A where B.COLA = A.COLA )
The above query updates all the rows in table B >:-<
Thanks for all your help.
There are 2 tables which are identical COLA being primary key:-
Table A Table B
---------------- ----------------
COLA COLB COLC COLA COLB COLC
1 ABC XYZ 1 ABC XYZ
2 PQR DEF 2 RPQ FDE
Except that Table A has Changed information which I need to
Sync with Table B at the end of the Day.
I am trying to use SQL to solve the above problem.
IS there anyway in Oracle to execute one SQL and acheive the above, I am aware that finally I can delete the record and reinsert it, however, I would like to do it using a update statement.
I have tried the following without success:
UPDATE B set (COLB, COLC) = ( select COLB, COLC from A where B.COLA = A.COLA )
The above query updates all the rows in table B >:-<
Thanks for all your help.