SQL Language (MOSC)

MOSC Banner

Update Query

edited Jun 23, 2010 4:31PM in SQL Language (MOSC) 5 commentsAnswered ✓
Using Oracle 9i database 9.2.0.5

Want to update a single column in all rows of a table with the value from another table.

Below is what I tried but it returns ORA-01427 single-row subquery returns more than one row.

 How is this done?

UPDATE CTC_SAR_OWNER.RECEIPT_LOG a SET SHPMNT_ID = (SELECT SHPMNT_iD FROM CTC_SERVICE_OWNER.SERVICE_LOG b                                WHERE a.RECPT_ID = b.RECPT_ID)

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center