Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Append value to an existing column with data

Status
Not open for further replies.

mkey

Programmer
Oct 3, 2001
288
CA
Hi All,
I need to update a column which might have a value or might not have a value. If I just update col_b I will loose my old value. How can I keep the old value and just append a new value to col_b?

Basically let say I have col_a and col_b.
col_a col_b
1 a
2 f
3


Result
col_a col_b
1 a appended value
2 f appended value
3 appended value
Any thoughts on this will help.
Thank you!
 
found the answer. thank you All!
 
Is there any reason why the following concatenation wouldn't work?

update your_table
set col_b = col_b || 'appended value';

You may have tried this already, but it seems like it's fairly close to what you want.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top