Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> SQL question
This is a multi-part message in MIME format.
------=_NextPart_000_06F4_01BFDC69.AF743A90 Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi , DBAs !
I've got a SQL question :
There is a table called COMPANY :
NAME ID MANAGER_ID PATH
AAA 5 2 /home/AAA BBB 10 5 NULL
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
Is there a way to do it ?
Thanks !
For statistics : i'm from Tel-Aviv , Israel .
Andrey Bronfin
VisualTop.com
------=_NextPart_000_06F4_01BFDC69.AF743A90 Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi , DBAs !</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I've got a SQL question :</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>There is a table called COMPANY =
:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>NAME =
ID =20
MANAGER_ID PATH</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>---------------------------------------------------------</FONT>=