on 07-14-2020 7:44 AM
Hi
IN below query i want to that List of Locations from Olct should be displayed for Selection. User should be able to select more than 1 Location. Also with Date From & Date To option.
SELECT M.DocEntry, M.DocNum AS 'AR Inv. #', M.DocDate as 'Date', M.CardName as 'Customer Name'
FROM OINV M LEFT OUTER JOIN INV1 L on L.DocEntry=M.DocEntry
LEFT OUTER JOIN INV4 T on T.DocEntry=L.DocEntry and L.LineNum=T.LineNum
LEFT OUTER JOIN INV5 J ON M.DocEntry = J.AbsEntry
LEFT OUTER JOIN INV3 Q ON M.DocEntry = Q.DocEntry
LEFT JOIN CRD1 A on M.CardCode=A.CardCode and M.PayToCode=A.Address and A.AdresType='S'
WHERE (M.DocDate >= '[%0]' AND M.DocDate <= '[%1]')
Thanks
Hi,
Check this if helps:
SELECT M.DocEntry, M.DocNum AS 'AR Inv. #', M.DocDate as 'Date', M.CardName as 'Customer Name', L.LocCode as 'AreaLoc' FROM OINV M LEFT OUTER JOIN INV1 L on L.DocEntry=M.DocEntry LEFT OUTER JOIN OLCT k ON k.Code = L.LocCode LEFT OUTER JOIN INV4 T on T.DocEntry=L.DocEntry and L.LineNum=T.LineNum LEFT OUTER JOIN INV5 J ON M.DocEntry = J.AbsEntry LEFT OUTER JOIN INV3 Q ON M.DocEntry = Q.DocEntry LEFT JOIN CRD1 A on M.CardCode=A.CardCode and M.PayToCode=A.Address and A.AdresType='S' WHERE (M.DocDate >= '[%0]' AND M.DocDate <= '[%1]') GROUP BY M.DocEntry, M.DocNum , M.DocDate, M.CardName, L.LocCode HAVING L.LocCode in ( '[%2]','[%3]','[%4]','[%5]')
regards,
Jitin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
96 | |
10 | |
9 | |
6 | |
3 | |
3 | |
3 | |
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.