Home » SQL & PL/SQL » SQL & PL/SQL » Update with concatenation
Update with concatenation [message #2773] Mon, 12 August 2002 15:13 Go to next message
NiGger
Messages: 6
Registered: July 2002
Junior Member
HiĦĦ

I'm trying to update all the rows of one column of a table adding to the existing value a string , something like that :

value before update: 01
value after update: TABPP01


As yo can see i'm adding the value TABPP to an existing value in the column ( the definition of the column is varchar2 ) , i suposed that the right script was something like that:

Update schema.table
SET column = TABPP||column_data
WHERE columnX is not null(or any condition);

What am i doing wrong?
Thankz in advanced
Re: Update with concatenation [message #2775 is a reply to message #2773] Mon, 12 August 2002 15:48 Go to previous message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
You are very close:

update t
   set c = 'TABPP' || c
 where ...;
Previous Topic: Query to select PK. / how to insert and update CLOB?
Next Topic: Passing a string list to a procedure
Goto Forum:
  


Current Time: Thu Apr 25 08:57:12 CDT 2024