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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Pivot Functionality in Server 2000

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 is

TRANSFORM 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_band
PIVOT [24rollupall].institution;

I am having problems with the transform and PIVOT function. please please help.

Thanks
Shailen

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
Go to Top of Page

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
Go to Top of Page

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



Hi

I 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 please

Thanks
Go to Top of Page

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]'
Go to Top of Page
   

- Advertisement -