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!

update taking more time -- how to improve performance or how to overwrite

user13115886Oct 15 2020 — edited Oct 15 2020

Hi,
Trying to take first two characters from Quote_Nbr and updating country in the same table.
Please advise.

UPDATE QUOTES_TABL a
SET a.Country = (SELECT SUBSTR (b.QUOTE_NBR, 2, 2)
FROM QUOTES_TABL b WHERE b.SOURCE = 'XX')
WHERE a.SOURCE = 'XX' AND a.QUOTE_NBR = b.QUOTE_NBR;

Thanks
AK

Comments

Post Details

Added on Oct 15 2020
2 comments
75 views