Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
lucifer
Starting Member
3 Posts |
Posted - 2012-10-27 : 23:42:31
|
I have a varchar col. in which I want to enter the value of an int column, and other two varchar values.something like:update tableset Cust = intColumnVal + '-' + varColumnVal + ...; where + isnt math op ofcourse, just string append.thanks |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-10-28 : 00:33:08
|
you need to cast it to varchar for appendupdate tableset Cust = cast(intColumnVal as varchar(10)) + '-' + varColumnVal + ...; ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2012-11-02 : 05:16:53
|
| You can just do a SELECTSELECT Cust = cast(intColumnVal as varchar(10)) + '-' + varColumnVal + ... FROM tableMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|