Below is what I currently have in query. I have a question for the line tha
t
has an asterisk before it.
Is there a way to show if a card number has shown up more than once on a
given settlement _batch_num? I have no clue what to put as the COUNT CASE
since I am searching over a period of settlement_batch_num's. I just need
cards that duplicate only on the same settlement_batch_num. Is there anyway
to list the card also? The settlement_batch_num is a certain day. Thanks
for any help.
Use Winpayment
GO
SELECT S.card_acceptor_identification STORE,
COUNT (M.message_type) TOTAL_#_TRANS,
COUNT(CASE WHEN id_code_1 = 'DB' and response_code <> '00' THEN 1 END)
DEBIT_DECLINED
*COUNT(CASE When card_num = ? and settlement_batch_num = ? )
FROM Store S
Left Join financial_message M
On M.card_acceptor_identification = S.card_acceptor_identification
And (settlement_batch_number >= '867'
And settlement_batch_nunber <= '888')
GROUP BY S.card_acceptor_identificationOn Tue, 24 May 2005 08:48:04 -0700, tarheels4025 wrote:
>Below is what I currently have in query. I have a question for the line th
at
>has an asterisk before it.
>Is there a way to show if a card number has shown up more than once on a
>given settlement _batch_num? I have no clue what to put as the COUNT CASE
>since I am searching over a period of settlement_batch_num's. I just need
>cards that duplicate only on the same settlement_batch_num. Is there anywa
y
>to list the card also? The settlement_batch_num is a certain day. Thanks
>for any help.
(snip)
Hi tarheels,
Since you're not exactly new to this group, you probably won't be
surprised to be pointed to www.aspfaq.com/5006.
From your description, I *THINK* that it's possible to do what you want
to do - but I also *KNOW* that I don't really understand your exact
requirements.
Post table structure, sample data and expected output (as indicated on
www.aspfaq.com/5006), then we'll be able to help you.
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment