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 |
|
olamalam
Starting Member
1 Post |
Posted - 2011-04-18 : 11:19:29
|
| Dear All,I need to write a query which brings me the data on the columns matched with column names.For example,id name surname age1 John Smith 20I need a query which brings me:id:1;name:John;surname:Smith;age:20Is it possible?Thanks in advancededit: moved to proper forum |
|
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2011-04-18 : 12:09:06
|
| Select 'id:'+convert(varchar(50),id)+';name:'+[name]+';surname:'+surname+';age:' + convert(varchar(3),age)from yourTableJimEveryday I learn something that somebody else already knew |
 |
|
|
|
|
|