Message-Id: <10536.110155@fatcity.com> From: "Veera Prasad" Date: Thu, 22 Jun 2000 10:30:15 -0400 Subject: 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 Content-Type: text/html; 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