Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

concatenating field values to update one column

user515689Feb 24 2011 — edited Feb 24 2011
Hello.

I have several columns in my table. I'd like to concatenate the value of one of the columns to another.

e.g.

I want to make COL B value = to value of COL B and COL C.

Can this be done? I know that
UPDATE tbl SET COL B =  COL C + COL B  
will not work, as Oracle perceives it as a math equation.
UPDATE tbl SET COL B =  COL C   
works, making COL B equal to, or rather the same as COL C's value.

Let's say COL B has John, and COL C has Smith, and I wanted to make COL B show JohnSmith, for example.

What's the proper syntax? I can't be that far off. Any feedback or tip is appreciated!

Thank you.
This post has been answered by Ganesh Srivatsav on Feb 24 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 24 2011
Added on Feb 24 2011
4 comments
10,660 views