Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: SQL question
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
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