April 4, 2013 at 2:37 pm
Hi Please help for below requirement.
I need to combine two columns of data and insert in new column
ex: if have col1 has 1, 2, 3 and col2 has 1, 2, 3 and i need new column as col3 by combining col1 and col2 like 11, 22, 33
I have two columns liek belwo
col1 col2
12
15
61
27
I need table like below
Col1 col2 col3
1212
1515
6162
2727
Thanks
Aswin
April 4, 2013 at 2:44 pm
assuming the data types of col1 and col2 are varchars:
update SomeTable
SET Col3 = Col1 + Col2
if they are integers, you will have to explicitly cast/convert the two columns.
Lowell
April 4, 2013 at 2:59 pm
Awesome..its working..
Thanks for your help
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply