on 06-10-2010 12:49 AM
Hi Experts,
My Client need a query that will show Credit Memo's and which Delivery Documents this is linked to.
How can I get this link if the Delivery was copied to a Invoice and the Invoice to the Credit Memo?
Thanks,
Marli
Hi Marli,
You may try:
SELECT Distinct T0.DocNum, T0.DocDate, T0.CardCode, T3.DocNum 'DLN #'
FROM dbo.ORIN T0
INNER JOIN dbo.INV1 T1 ON T1.TrgetEntry = T0.DocEntry
INNER JOIN dbo.dln1 T2 ON T2.TrgetEntry = T1.DocEntry
INNER JOIN dbo.odln T3 ON T3.DocEntry = T2.DocEntry
WHERE T3.DocNum LIKE '[%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 |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
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.