Avatar of Phil Chapman
Phil Chapman
Flag for United States of America

asked on 

MSSQL Query

Issue:
A person has several invoice that may have one or more transactions in a Transaction file.
What I need to do is get the transactions ID where some of the transactions equal a specified amount.

Sample Transaction Table Fields

Transaction_ID
TranDate
InvoiceNo
Amount

The query below would give me what I need IF IT WOULD ONLY WORK

SELECT Transaction_ID
FROM AccountsTransactions
WHERE Invoice IN (106263,106262,106367,106367) AND
SUM(Amount) = 2388.60

PLEASE HELP I NEED TO GET THE Transaction_ID of those transaction where the sum = 2388.60
SQL

Avatar of undefined
Last Comment
Pawan Kumar

8/22/2022 - Mon