Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: SQL question
--------------A2E1656BEBEF66B05D152452 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit
Try this way ..
VPRASAD: PRECY>select * from test_Table;
NO DT COL1 --------- -------------------- -------------------------------- 1 22-jun-2000 10:28:35 Veera
VPRASAD: PRECY>update test_table set col1 = col1||'/dba' where no = 1;
1 row updated.
VPRASAD: PRECY>select * from test_table;
NO DT COL1 --------- -------------------- -------------------------------- 1 22-jun-2000 10:28:35 Veera/dba
Regards
Veera
Andrey Bronfin wrote:
> Hi , DBAs !I've got a SQL question :There is a table called COMPANY > : NAME ID MANAGER_ID > PATH---------------------------------------------------------AAA > 5 2 /home/AAABBB 10 > 5 NULL I want to perform something like :update COMPANY > bset 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 . > Andrey Bronfin > VisualTop.com --------------A2E1656BEBEF66B05D152452
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<body bgcolor="#FFFFFF">
Try this way ..
<br>VPRASAD: PRECY>select * from test_Table;
<p> NO DT
COL1
<br>--------- -------------------- --------------------------------
<br> 1 22-jun-2000 10:28:35 Veera
<p>VPRASAD: PRECY>update test_table set col1 = col1||'/dba' where no =
1;
<p>1 row updated.
<p>VPRASAD: PRECY>select * from test_table;
<p> NO DT
COL1
<br>--------- -------------------- --------------------------------
<br> 1 22-jun-2000 10:28:35 Veera/dba
<p>Regards
<br>Veera
<p>Andrey Bronfin wrote:
<blockquote TYPE=CITE><style></style>
<font face="Arial"><font size=-1>Hi
, DBAs !</font></font><font face="Arial"><font size=-1>I've got a SQL question
:</font></font><font face="Arial"><font size=-1>There is a table called
COMPANY :</font></font> <font face="Arial"><font size=-1>NAME
ID MANAGER_ID PATH</font></font><font face="Arial"><font size=-1>---------------------------------------------------------</font></font><font face="Arial"><font size=-1>AAA 5 2 /home/AAA</font></font><font face="Arial"><font size=-1>BBB 10 5 NULL</font></font> <font face="Arial"><font size=-1>I want to perform something like :</font></font><font face="Arial"><font size=-1>update COMPANY b</font></font><font face="Arial"><font size=-1>set PATH = (select PATH from COMPANY a where b.MANAGER_ID = a.ID)||'/BBB' where NAME='BBB' ;</font></font> <font face="Arial"><font size=-1>It should update the PATH column for BBB to be '</font></font> <font face="Arial"><font size=-1>/home/AAA/BBB'</font></font> <font face="Arial"><font size=-1>The query does not work this way . I recieve the error message :</font></font><font face="Arial"><font size=-1>ERROR at line 1:</font></font>
![]() |
![]() |