CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Threaded View

  1. #1
    Join Date
    Jul 1999
    Location
    Poland
    Posts
    278

    Pivot Table and ORDER BY -problem

    Hello

    I use MS SQL 2000. I need to present some rows as new columns.
    Thanks to help hspc I know how to do it but ...

    I think that my query ( please find enclosed file ) is simply wrong.
    To get result without error I need to add one extra column R.ReelGrade. Without this column I returned an error:
    Column R.ReelGrade is invalid in the selected list because it is not contained in either an aggregatefunction or the GROUP BY clasue

    I don't need to ORDER BY the second column. My oryginal query will SELECT at least 20 columns, I don't want to add 20 extra column to ORDER BY calsue.
    Could you please tell me what my query should be.

    PS
    I found some info about it hereSQL GROUP BY techniques but it is not clear enough for me.

    Thanks in advance
    Attached Images Attached Images

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured