on 04-13-2010 6:21 AM
Hi All,
Required the list of Open Invoices order than 180 days with the following fields :
Doc No
BP Code
BP Name
Doc Total
Balance Due
Ocrcode (Location)
Thanks and Regards,
Arbaaz Khan.
Try this:
SELECT DISTINCT T0.DocNum, T0.DocDate, T0.CardCode, T0.CardName, T0.DocTotal, (T0.DocTotal - T0.PaidToDate) 'Balance Due', T1.Ocrcode
FROM dbo.OINV T0
INNER JOIN dbo.INV1 T1 ON T1.DocEntry = T0.DocEntry
WHERE Datediff(dd, T0.docdate, Getdate()) > 180 AND T0.DocStatus = 'O'
Thanks,
Gordon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try this query:
SELECT DISTINCT T0.DocNum, T0.CardCode, T0.CardName, T0.DocTotal, T1.Ocrcode FROM OINV T0, INV1 T1
WHERE T1.Docentry = T0.DocEntry
AND Datediff(dd, T0.docdate,Getdate()) > 180
AND T0.DocStatus = 'O'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
100 | |
11 | |
11 | |
6 | |
6 | |
5 | |
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.