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 |
|
rajeevalochan
Starting Member
1 Post |
Posted - 2007-06-18 : 02:22:05
|
| Hi i am new to crosstab feature.i want a crosstab dynamically with this below table please help me .Thanks in advance.Table :-id name costtype month&year amount1 a1 Bcost 9/2005 3002 a1 Ecost 9/2005 200 3 a1 Acost 9/2005 1004 a2 Bcost 10/2005 1505 a2 ECost 10/2005 1006 a2 Acost 10/2005 1507 a3 Bcost 11/2005 1508 a3 ECost 11/2005 1009 a3 Acost 11/2005 150 I want result table like this :- ID Name Cost_Type 9/2005 10/2005 11/20051 a1 Bcost 300 -2 a1 Ecost 200 -3 a1 Acost 100 -4 a2 Bcost - 1505 a2 ECost - 1006 a2 Acost - 1507 a3 Bcost - - 150 8 a3 ECost - - 100 9 a3 Acost - - 150I want above result Please Give me your help.Thanks in advance,Rajeev |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
|
|
|
|
|