Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Multiple row update from subquery

Carl CNov 5 2018 — edited Nov 5 2018

Hi guys,

I've 2 tables, one which data must be update (Table 1) and second table with correct data (Table 2)

Table 1 looks like this:

    

IDCOL2
AAA1209200
BBB2308197
CCC1105194
AAA1209200
EEE0611201

Table 2

    

IDCOL4
AAA12092003
BBB23081978
CCC11051947
EEE

06112011

I need to update col2 in table 1 with values from col 4 from table 2

for each ID in table 1.

I try to use a subquery but it returns an error message (more then one row returned in subquery, which I understand)

Any clues? Or a procedure is necessary ?

Thank if you can help

Rgds

Carlos

This post has been answered by JonWat on Nov 5 2018
Jump to Answer
Comments
Post Details
Added on Nov 5 2018
7 comments
2,082 views