on 05-10-2011 4:33 PM
I am in need of a query that will isolate the invoices posted between the first day of the year through the check date run (variable) , which they have the same invoice number.
Can anyone help me?
Hi,
Try this:
SELECT T0.DocNum 'Invoice#', T0.DocDate, T0.DocTotal, T0.PaidToDate, T1.DocNum 'Payment#', T2.DocDate
FROM OPCH T0
INNER JOIN VPM2 T1 ON T1.DocEntry=T0.DocEntry
INNER JOIN OVPM T2 ON T2.DocEntry=T1.DocNum AND T2.CheckSum > 0
WHERE Year(T0.DocDate)=Year(GetDate()) AND T2.DocDate < [%0\]
Thanks,
Gordon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.