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 |
|
Shailen
Starting Member
17 Posts |
Posted - 2005-03-08 : 05:49:33
|
| Hey guys. I need some help desperately. I am going crazy trying to convert this code from Ms Access sql to Sql Server 2000. Can anyone help please. I tried to use the code on the website for creating pivot functionality and its not working. The code isTRANSFORM Sum([24rollupall].SumOfSumOfBOND_AMOUNT) AS SumOfSumOfSumOfBOND_AMOUNT SELECT [24rollupall].SUBURB, [24rollupall].price_band, Sum([24rollupall].SumOfSumOfBOND_AMOUNT) AS [Total Of SumOfSumOfBOND_AMOUNT] into [24rollupall_Crosstab]FROM [24rollupall]GROUP BY [24rollupall].SUBURB, [24rollupall].price_bandPIVOT [24rollupall].institution;I am having problems with the transform and PIVOT function. please please help.ThanksShailen |
|
|
Shailen
Starting Member
17 Posts |
Posted - 2005-03-09 : 01:12:53
|
| Come on guys, Not one of you know???? Find that hard to believe |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2005-03-09 : 08:01:33
|
| Well, we do know how to use the SQL Team search utility:http://www.sqlteam.com/searchresults.asp?SearchTerms=cross+tab |
 |
|
|
Shailen
Starting Member
17 Posts |
Posted - 2005-03-09 : 08:42:41
|
quote: Originally posted by robvolk Well, we do know how to use the SQL Team search utility:http://www.sqlteam.com/searchresults.asp?SearchTerms=cross+tab
HiI tried using the crosstab function on the website but i am having problems converting my ms sql code to use that function. Can you assist me pleaseThanks |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2005-03-09 : 12:39:24
|
| EXEC @crosstab 'SELECT [24rollupall].SUBURB, [24rollupall].price_band, Sum([24rollupall].SumOfSumOfBOND_AMOUNT) AS [Total Of SumOfSumOfBOND_AMOUNT] FROM [24rollupall]GROUP BY [24rollupall].SUBURB, [24rollupall].price_band','Sum([24rollupall].SumOfSumOfBOND_AMOUNT)','institution','[24rollupall]' |
 |
|
|
|
|
|
|
|