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 |
|
sqlfresher2k7
Aged Yak Warrior
623 Posts |
Posted - 2007-11-16 : 13:18:13
|
| I have a table which contains data belowSelect col1,col2 from table1Col1 Col2 ---- -----01.00 Test102.00 Test2I want data to be displayed likeConcatCol -------------'01.00','Test1''02.00','Test2'Thanks for your help in advance!! |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-11-16 : 13:26:30
|
| You can use + to concatenate strings in T-SQL. SELECT Column1 + Column2 AS NewColumnFROM YourTableYou'll need to add the formatting to the string though.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/ |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-11-19 : 02:19:33
|
| Also you need to cast the columns to varchar if they are notMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|