Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Oracle Update SQL Help

Oracle Update SQL Help

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

Hi All,

Here's the scenario.

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

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

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

                            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.

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
where TableA.id = TableB.id

--
Thanks,

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US