on 2024 Oct 07 1:41 PM
I am looking to create a report showing
All suppliers
Payment Terms
Current Account Balance
Last purchase invoice date
I can get all fields correct apart from the date of that suppliers last invoice date.
Can anyone assist please?
Hi,
try this
SELECT
OCRD.CardCode
,OCRD.CardName
,(
SELECT
MAX(T0.DocDate)
FROM
OPCH T0
WHERE
T0.CardCode = OCRD.CardCode
AND
T0.CANCELED = 'N'
) AS [Last purchase invoice date]
FROM
OCRD
WHERE
OCRD.CardType = 'S'
regards LOthar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
30 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.