Results 1 to 2 of 2

Thread: crosstab

  1. #1
    Join Date
    May 2002
    Posts
    1

    Unanswered: crosstab

    Dear all,

    I have a table[Category] like this:
    Name | Category | total
    Buchanan | Beverages | 400
    Buchanan | Cnodiments | 500
    Buchanan | Confections | 600
    Callahan | Beverages | 700
    Callahan | Condiments | 800
    Callahan | Confections | 900

    I would like to display it as follows:
    Name | Beverages | Condiments | Confections
    Buchanan | 400 | 500 | 600
    Callahan | 700 | 800 | 900

    What is the SQL statement to do the above selection? Thanks for your help.

    Regards,
    Fred

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002

Posting Permissions

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