Friday, February 24, 2012

Crosstab Query

I have a query running on MS Access like this :
TRANSFORM Count(ActivityClass) AS CountOfActivityClass
SELECT ActivityClass
FROM Category
GROUP BY ActivityClass
PIVOT Type
but how it's can be run on SQL Server, is there any function on SQL to run
the Transform function?
ThanksHi
There is no function in SQL 2000 that will do this, the most efficient way
is to do it within the application. But you may also want to check out:
http://support.microsoft.com/defaul...b;EN-US;q175574
or
http://www.sqlteam.com/item.asp?ItemID=2955
or
http://www.rac4sql.net/
John
"Firmansyah" wrote:

> I have a query running on MS Access like this :
> TRANSFORM Count(ActivityClass) AS CountOfActivityClass
> SELECT ActivityClass
> FROM Category
> GROUP BY ActivityClass
> PIVOT Type
> but how it's can be run on SQL Server, is there any function on SQL to run
> the Transform function?
> Thanks
>
>|||Hi,
Thanks very much for the infomation
Firman
"John Bell" <JohnBell@.discussions.microsoft.com> wrote in message
news:0195E062-2769-4202-B065-FD180D2958FF@.microsoft.com...
> Hi
> There is no function in SQL 2000 that will do this, the most efficient way
> is to do it within the application. But you may also want to check out:
> http://support.microsoft.com/defaul...b;EN-US;q175574
> or
> http://www.sqlteam.com/item.asp?ItemID=2955
> or
> http://www.rac4sql.net/
> John
>
> "Firmansyah" wrote:
>

No comments:

Post a Comment