cancel
Showing results for 
Search instead for 
Did you mean: 

Query Help

Former Member
0 Kudos

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?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

Thank you Gordon! I believe this will give them exactly what they are needing.

Answers (0)