SQL Server Performance

Assistance on Pivot Table

Discussion in 'General Developer Questions' started by Anjo, Jul 27, 2003.

  1. Anjo New Member

    Good day everyone,<br /><br />I have this table:<br /><br /><font color="red">P DateRBC WBC</font id="red"><br />1 7/03100 100<br />1 8/03150 150<br />1 9/03200 200<br /><br />That i wanted to look like this in a stored proc or function:<br />Parameters: @yr, @P (patient's id)<br /><br /><font color="red">Typ 7/03 8/03 9/03</font id="red"><br />RBC 0100 0150 0200<br />WBC 0100 0150 0200<br /><br />Sort of a crosstab query in MS Access. But the keyword Pivot, when used in a stored proc, was not recognized as such. Have other options of doing a crosstab, but if I could make pivot table work, then I don't have to do the long way in my asp codes. Does anybody has a suggestion? Any sample codes?<br /><br />Your help is highly appreciated.<br />Anjo [<img src='/community/emoticons/emotion-12.gif' alt=':X' />]
  2. rushmada New Member

    U can see cross-tab reports in Sql server books online for more info
    which may helpfull.



    Rushendra
  3. bambola New Member

Share This Page