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 |
|
magmo
Aged Yak Warrior
558 Posts |
Posted - 2007-06-29 : 04:52:58
|
| HiI would like to add a integer value with a string value like thisSELECT (dbo.mytable.ID & dbo.mytable.thename) AS MyNewString FROM MyTableHow would I do that? |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-06-29 : 04:59:16
|
[code]SELECT CONVERT(varchar(10), dbo.mytable.ID) + dbo.mytable.thename AS MyNewString FROM MyTable[/code] KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-06-29 : 09:08:52
|
Seems now-a-days lot of concatenated questions MadhivananFailing to plan is Planning to fail |
 |
|
|
magmo
Aged Yak Warrior
558 Posts |
Posted - 2007-06-29 : 09:11:43
|
| Worked perfect, Thanks! |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-06-29 : 09:15:04
|
| Note that during concatenation you should also handle NULL if one or more of the columns allow NULLsMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|