Re:RE: JOINED UPDATE

  • From: "system manager" <sysmgr@xxxxxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Wed, 11 Feb 2004 14:59:41 -0600

thank you very very much.   

update account A
set (A.expire_dt, A.curr_eff_dt, A.acct_end_dt)
=
(select T.expire_dt, T.curr_eff_dt, T.acct_end_dt from temp_savedates T
where T.acct_num=A.acct_num)
where A.acct_num in (select T.acct_num from temp_savedates T);

----------------------------------------------
Original Message
From: "Jacques Kilchoer"<Jacques.Kilchoer@xxxxxxxxx>
Subject: RE: JOINED UPDATE
Date: Wed, 11 Feb 2004 12:13:46 -0800

>The syntax you have below will cause an error in Oracle.
>
>Oracle version of your statement would be:
>update account
>set (account.expire_dt,
>  account.curr_eff_dt,
>  account.acct_end_dt) =3D (select temp_savedates.expire_dt,
>  temp_savedates.curr_eff_dt,
>  temp_savedates.acct_end_dt
>  from temp_savedates
>  where account.acct_num =3D temp_savedates.acct_num)
>where exists
>(select * from temp_savedates
>  where account.acct_num =3D temp_savedates.acct_num) ;
>
>> -----Original Message-----
>> system manager
>>=20
>> Is Oracle support joined update like  SQL written like ANSI.=20
>> But SQL Server
>> does?  Can we do below query in Oracle?
>>=20
>> update account=20
>> set account.expire_dt=3Dtemp_savedates.expire_dt,
>> account.curr_eff_dt=3Dtemp_savedates.curr_eff_dt,
>> account.acct_end_dt=3Dtemp_savedates.acct_end_dt
>> from account, temp_savedates
>> where account.acct_num=3Dtemp_savedates.acct_num;
>----------------------------------------------------------------
>Please see the official ORACLE-L FAQ: http://www.orafaq.com
>----------------------------------------------------------------
>To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
>put 'unsubscribe' in the subject line.
>--
>Archives are at //www.freelists.org/archives/oracle-l/
>FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
>-----------------------------------------------------------------
>

_____________________________________________
Free email with personality! Over 200 domains!
http://www.MyOwnEmail.com
Looking for friendships,romance and more?
http://www.MyOwnFriends.com

----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts: