Quick script to calculate # of credit card transactions?

I'm trying to work out how to calculate how many credit card transactions we ran through Tessitura last year. I was assuming that it was just the count of distinct payment_nos in T_PAYMENT that had a credit card type of pmt_method.

But is there some other catch to it all that I should know about?

  • Former Member
    Former Member $organization

    Do you have payment method groups set up? You could calculate all the payment methods in the credit card group. That is easier than specifying all the payment methods.

     

     

     

    From: Tessitura Technical Forum [mailto:forums-technical@tessituranetwork.com] On Behalf Of Matthew Hodge
    Sent: Tuesday, February 28, 2012 5:16 PM
    To: Gloria Ormsby
    Subject: [Tessitura Technical Forum] Quick script to calculate # of credit card transactions?

     

    I'm trying to work out how to calculate how many credit card transactions we ran through Tessitura last year. I was assuming that it was just the count of distinct payment_nos in T_PAYMENT that had a credit card type of pmt_method.

    But is there some other catch to it all that I should know about?




    This message was sent automatically to you by www.tessituranetwork.com because you subscribed to the Tessitura Technical Forum. You may reply to this message to post to the Technical 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!

  • Try this

     

    select count(distinct payment_no)

    from t_payment y

    inner join tr_payment_method m on m.id=y.pmt_method

    where act_type in (1,2,3,4)

    where pmt_dt between <whenever> and <whenever>

     

  • I use this...

     

    select    acct.description as [Card Type]
                  ,sum (p.pmt_amt) as [Sum]
                  ,count( distinct p.payment_no) as [Transactions]

        from      t_payment p (nolock) join
                      tr_payment_method pmt (nolock) on pmt.id = p.pmt_method join
                      tr_account_type acct (nolock) on acct.id = pmt.act_type

     

      where     p.pmt_dt between '2009-06-1 00:00:00.000' 
                      and '2013-06-1 00:00:00.000'

     

          group by acct.description
          order by acct.description

     



    [edited by: Chris Hipschen at 6:13 PM (GMT -6) on 29 Feb 2012]
  • Thanks for that, guys. The most important thing was making sure I select distinct payment_no, rather than a count, so thank you for clarifying.