Orders by payment method

Hello everyone,

I'm racking my brains trying to work out a way of pulling all orders which use a specific payment method either through lists/output sets or T-Stats or some other way.

We need to know the value of each of each individual orders which used the payment method.

Thank you everso much for your help

Graeme Ellis
Young Vic Theatre

  • Hi Graeme,

     

    Try hacking the query below which I use when a performance doesn’t balance correctly, it’s based on perf_no but you can easily change that.

     

    select 

    t.transaction_no,

    o.customer_no,

    t.order_no,

    pt.description as "payment_type",

    pm.description as "payment_method",

    sum(p.pmt_amt) as "payment_amount"

     

    from t_transaction t (nolock)

     

    JOIN t_payment p (nolock) ON t.transaction_no = p.transaction_no and t.sequence_no = p.sequence_no

     

    JOIN t_perf prf (nolock) ON t.perf_no = prf.perf_no

     

    JOIN tr_payment_method pm (nolock) ON p.pmt_method = pm.id

     

    JOIN tr_payment_type pt (nolock) ON pm.pmt_type = pt.id

     

    JOIN t_order o (nolock) ON t.order_no = o.order_no

     

    where prf.perf_no = @perf_no  

     

    group by t.transaction_no, o.customer_no, t.order_no, pt.description, pm.description

     

     

    From: Tessitura Ticketing Forum [mailto:forums-ticketing@tessituranetwork.com] On Behalf Of Graeme Ellis
    Sent: 06 October 2009 13:45
    To: Halliday, Gary
    Subject: [Tessitura Ticketing Forum] Orders by payment method

     

    Hello everyone,

    I'm racking my brains trying to work out a way of pulling all orders which use a specific payment method either through lists/output sets or T-Stats or some other way.

    We need to know the value of each of each individual orders which used the payment method.

    Thank you everso much for your help

    Graeme Ellis
    Young Vic Theatre




    This message was sent automatically to you by www.tessituranetwork.com because you subscribed to the Tessitura Ticketing Forum. You may reply to this message to post to the Ticketing forum or visit the site to search, read and post to the forums. In the interest of keeping the forum posts from becoming cluttered, we encourage you to delete previous message text from your reply before sending. Thank you!


    www.southbankcentre.co.uk

    Ticket Office: 0844 847 9910

    Southbank Centre is a Registered Charity No. 298909

    ______________________________________________________________________

    This message (and files transmitted with it) may contain confidential or copyright information. If you receive it in error, please notify the sender and delete it from your computer.

    _______________________________________________________________________
  • Thanks for that, Gary

    Really helpful and my brain feels less racked.

    Grae