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 |
|
raphikdanish
Starting Member
2 Posts |
Posted - 2011-02-07 : 08:05:46
|
| Hi,I have a tableTableName: IndexindID indDesc indNo-------------------------1 string1 9992 string2 9993 string3 9984 string4 998I want to display all the records where indNo=999, but the output should be like below:indDesc indDesc indNo---------------------------string1 string2 99I will be very much thankful to receive reply.Thanks.Danish |
|
|
LoztInSpace
Aged Yak Warrior
940 Posts |
Posted - 2011-02-07 : 08:51:33
|
| It's not going to happen in RDBMS land unless you can guarantee the number of columns. You can it out as a single string unsing AS XML voodoo but not as multiple columns. |
 |
|
|
raphikdanish
Starting Member
2 Posts |
Posted - 2011-02-07 : 09:04:50
|
quote: Originally posted by LoztInSpace It's not going to happen in RDBMS land unless you can guarantee the number of columns. You can it out as a single string unsing AS XML voodoo but not as multiple columns.
Very strange. I hope someone could have found some solution. |
 |
|
|
LoztInSpace
Aged Yak Warrior
940 Posts |
Posted - 2011-02-07 : 09:08:43
|
| No it's not strange - it's the way things work. You certainly can do it as a single string or if you know the number of columns, but if you are considering variable columns as a solution then you misunderstand the way relational databases work.What are you trying to do? |
 |
|
|
|
|
|