Oracle Update SQL Help

From: Lanky <mdang_at_NOSPAMmy-deja.com>
Date: 2000/04/18
Message-ID: <8dis0m$7p9e5$1_at_fu-berlin.de>#1/1


[Quoted] Hi All,

[Quoted] Here's the scenario.

2 Tables Exactly the same data structure and data except for 3 fields in [Quoted] table A are null.

[Quoted] [Quoted] 1 primary key in both tables. The data is all the same in Table A & B [Quoted] except for 3 fields in Table A.

[Quoted] Data Structure for both TBL A & B (example 1 row of data given below)

[Quoted]                             TBL A        TBL B
PK -     ID            1                1
            Col1         JKL            JKL
            Col2        NULL          ABC
            Col3        NULL          ABC
            Col4        NULL           ABC
            Col5        ABC            ABC

The data is the same just need to get the 3 fields in Table B into TAble A.

[Quoted] This is what I got but didn't work.

Update Table B
set TableB.col1 = TableA.col1,
TableB.col2 = TableA.col2,
TableB.col3 = TableA.col3
from table A
[Quoted] where TableA.id = TableB.id

--
Thanks,

Lanky
Received on Tue Apr 18 2000 - 00:00:00 CEST

Original text of this message