Re: SQL
From: Brian P. Mac Lean <brian.maclean_at_teldta.com>
Date: 1996/10/14
Message-ID: <3262AA60.1AE5_at_teldta.com>#1/1
FIRST SQL> update tab set field = 'SECOND ' || field; 1 row updated.
SQL> commit;
Commit complete.
SQL> select * from tab;
FIELD
SECOND FIRST SQL> update tab set field = 'THIRD ' || field; 1 row updated.
SQL> commit;
Commit complete.
SQL> select * from tab;
FIELD
THIRD SECOND FIRST SQL> update tab set field = field || ' 4'; 1 row updated.
SQL> commit;
Commit complete.
SQL> select * from tab;
FIELD
THIRD SECOND FIRST 4
Date: 1996/10/14
Message-ID: <3262AA60.1AE5_at_teldta.com>#1/1
JB PLANTIN wrote:
>
> I've got to update a column adding some characters.
>
> The query i tried is the following :
>
> >update table1 set col1=concat('01',col1)
> >where col1 like '30%';
>
> It doesn't work. So, if someone could tell me if there's something
> wrong ?
> I would appreciate.
SQL> create table tab(field varchar2(20));
Table created.
SQL> insert into tab values('FIRST');
1 row created.
SQL> commit;
Commit complete.
SQL> select * from tab;
FIELD
FIRST SQL> update tab set field = 'SECOND ' || field; 1 row updated.
SQL> commit;
Commit complete.
SQL> select * from tab;
FIELD
SECOND FIRST SQL> update tab set field = 'THIRD ' || field; 1 row updated.
SQL> commit;
Commit complete.
SQL> select * from tab;
FIELD
THIRD SECOND FIRST SQL> update tab set field = field || ' 4'; 1 row updated.
SQL> commit;
Commit complete.
SQL> select * from tab;
FIELD
THIRD SECOND FIRST 4
--
\\|//
(0-0)
+-----oOO----(_)-----------+
| Brian P. Mac Lean |
| Database Analyst |
| brian.maclean_at_teldta.com |
| http://www.teldta.com |
+-------------------oOO----+
|__|__|
|| ||
ooO Ooo
Received on Mon Oct 14 1996 - 00:00:00 CEST
