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 |
|
learntsql
524 Posts |
Posted - 2009-07-08 : 08:16:47
|
| Hi all,i have my data as folloesStatus Stage1 stage2 A 1 0 B 2 1 C 1 0 D 1 1Now i want my output likeStage1 ACCEPTED Denied Stage2 Accepted denied 4 3 2 2 1 1note: status 'C' for Deniedplease tell me.Thanx. |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2009-07-08 : 08:19:34
|
are you using SQL 2005 ? KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
learntsql
524 Posts |
Posted - 2009-07-08 : 08:35:57
|
| yesi am using sql 2005. |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2009-07-08 : 08:44:27
|
Check BOL on PIVOT operator KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
learntsql
524 Posts |
Posted - 2009-07-08 : 09:19:17
|
| I already did PIVOT and the above data is the result of that only and if again do will it affect on performance.can you please tell me the solution.thanks. |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2009-07-08 : 09:31:28
|
you mean the above is a result of PIVOT ? then can you post the original table structure and the corresponding sample data ? KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
learntsql
524 Posts |
Posted - 2009-07-08 : 09:49:26
|
| Thanx khtan,sorry i couldnt send sample data.but I got solution when i again do pivot on existing pivot.Could you please tell the performance impact in above schenario.Thanks. |
 |
|
|
|
|
|