Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: SQL question
Hi!
Try smth like this:
update COMPANY b
set PATH = (select PATH||'/BBB' from COMPANY a where b.MANAGER_ID =
a.ID)where NAME='BBB' ;
HTH,
Michael
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
set PATH = (select PATH from COMPANY a where b.MANAGER_ID = a.ID)||'/BBB'
where NAME='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 . Received on Thu Jun 22 2000 - 12:23:02 CDT