Pivot Table Help

  • I have a table (SurverResults) with the following columns:

    id_num int ID of person taking survey

    question_num int Question #

    answer varchar(128)

    I will have 25 rows (max) for each ID (up to 25 questions)

    I need to see it as

    ID,Answer to Question 1, Answer to Question 2, etc.

    Can't quite seem to grasp the Pivot syntax to use

  • Please have a look at the CrossTab article referenced in my signature for a different way to do it.

    If you need additional help, please post table def and sample data in a ready to use format as described in the first link in my signature together with your expected result and what you've tried so far.



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • Thanks, got it to work

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

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