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!

Struggling with seemingly trival update statement

595397Sep 28 2007 — edited Sep 28 2007
Hi,

I'm after some suggestions on how to rewrite the following Psuedo SQL :

Setup :

create table t ( id number, val char(1), flag char(1) );
create table t2 ( id number, val1 char(1), flag char(1) );

Psuedo SQL:

with s as (select id, val from t where flag = 'Y')
update t2
set val1 = s.val
where id = s.id

Thanks for your time.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 26 2007
Added on Sep 28 2007
2 comments
128 views