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: SQL question

Re: SQL question

From: Jonathan Gennick <jonathan_at_gennick.com>
Date: Thu, 22 Jun 2000 13:38:42 -0400
Message-Id: <10536.110173@fatcity.com>


Off-hand, I'd suggest the following:

update company b
set path =3D (select path || '/BBB' from company a where b.manager_id=3Da.id);

My guess is that you can't use a subquery as part of a larger expression, but you should be able to make your expression part of the subquery.

Jonathan



jonathan_at_gennick.com =20
http://gennick.com
Brighten the Corner Where You Are

On Thu, 22 Jun 2000 06:56:30 -0800, you wrote:

>I want to perform something like :
>update COMPANY b =20
>set PATH =3D (select PATH from COMPANY a where b.MANAGER_ID =3D =
a.ID)||'/BBB' where NAME=3D'BBB' ;
>
>It should update the PATH column for BBB to be ' /home/AAA/BBB'
>
>The query does not work this way . I recieve the error message :
>ERROR at line 1:
>ORA-00933: SQL command not properly ended
Received on Thu Jun 22 2000 - 12:38:42 CDT

Original text of this message

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