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 |
|
anjan
Starting Member
21 Posts |
Posted - 2005-11-04 : 08:52:30
|
| When I am executing the crosstab query(which is given in this forum -crosstab query with four parameters)it's working fine for single sum statement.but..i want to execute the query in the following format.How can i get that??? waiting for ur response...exec Crosstab 'Select temp2 from temp group temp2','convert(varchar,sum(temp11))+convert(varchar,sum(temp11))','temp1',--pivot'temp'--tableHere i'm concatinating the two 'sum' fields. |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
anjan
Starting Member
21 Posts |
Posted - 2005-11-05 : 07:24:40
|
| my Temp table data is:temp1 temp2 temp5 temp1110 A 5 150.0020 B 1 100.0010 A 2 50.00 required output is :temp2 10 20-------------------------------A [7]200.00 nullB null [1]100.00 |
 |
|
|
anjan
Starting Member
21 Posts |
Posted - 2005-11-05 : 07:31:28
|
| why i'm not getting the above result with this queryexec Crosstab 'Select temp2 from temp group temp2','['+'convert(varchar,sum(temp5))'+']'+ convert(varchar,sum(temp11))','temp1',--pivot'temp'--table |
 |
|
|
|
|
|