Results 1 to 2 of 2

Thread: Crosstab query

  1. #1
    Join Date
    Oct 2011

    Unanswered: Crosstab query

    I have created crosstab queries based on a single column in a table, but now need to have ove based on multiple columns.

    My table is as follows;
    trandate as date
    cards as dec(5,2)
    cash as dec(5,2)
    cheques as dec(5,2)

    I want to product a crosstab as follows;

    TranType Monday Tuesday Wednesday ........etc etc
    cards 500.00 200.00 450.00
    cash 100.00 325.00 100.00
    cheques 50.00 0.00 5000.00

    hints and tips would be great


  2. #2
    Join Date
    Apr 2002
    Toronto, Canada
    any reason why you couldn't do this with your application code (php or whatever)

    that's where cosmetic re-arrangement of query results should take place

    besides, it's way messier in sql | @rudydotca
    Buy my SitePoint book: Simply SQL

Tags for this Thread

Posting Permissions

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