BIT data type and aggregate function

  • Hy. I need to pivot a table.

    select * from MyTable() pivot(State for Description in (Col1, Col2)

    where State is a bit column and need to apply an aggregate function. I am sure thas a have only one row coresponding.

    Thanks for help

  • Well, you seem to want to use the PIVOT operator, but you have posted in the SQL 2000 forum. The PIVOT operator is not available in SQL 2000. Are you using SQL Server 2000 or SQL 2005?

  • 2005

  • May I suggest using BOL subject "Using Pivot and Unpivot" or url:

    ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/24ba54fc-98f7-4d35-8881-b5158aac1d66.htm

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply