Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: QUERY

Re: QUERY

From: biti_rainy <biti_rainy_at_itpub.net>
Date: Wed, 28 Apr 2004 10:31:12 +0800
Message-Id: <20040428021736.8774A72CD94@turing.freelists.org>


hi,Seema Singh

   Any advice are welcome.
update main_test a
set a.directions =3D(select b.access1 from trail_main b where b.trail_name =3D a.trail_name

     and b.trail_code =3D a.trail_code)
This is updating 6595 rows.

you update all the rows in table main_test if the main_test has some rows but the key values not in =  trail_main
then you will update the directions =3D NULL ;

>update main_test a
>set a.directions =3D (select access1 from trail_main b
> where a.trail_name =3D b.trail_name
> and a.trail_code =3D b.trail_code )
>where a.trail_id =3D ANY (select a.trail_id from
> vw_trail_main_test a, trail_main=
 b
> where a.trail_name =3D b.trail_name and=
 a.trail_code
>=3D b.trail_code )

  this is correct . you can only update the rows in main_test=  that the key values in trail_main   

Best regards

yahoo id: feng_chunpei
A new dba from china

>Please see the official ORACLE-L FAQ: http://www.orafaq.com
>----------------------------------------------------------------=

>To unsubscribe send email to: oracle-l-request_at_freelists.org
>put 'unsubscribe' in the subject line.
>--
>Archives are at http://www.freelists.org/archives/oracle-l/
>FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
>----------------------------------------------------------------=
-
>
>.

=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Tue Apr 27 2004 - 21:27:33 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US