Tuesday, January 22, 2013
Dynamics GP - SQL Views - Purchase Requisition, PO, Receipt
SELECT
DYNAMICS.dbo.ReqMgmtLines.CompanyID, DYNAMICS.dbo.SY01500.CMPNYNAM, DYNAMICS.dbo.ReqMgmtLines.DocumentID AS ReqID,
DYNAMICS.dbo.ReqMgmtDocument.CreatedDate AS ReqCreatedDate, DYNAMICS.dbo.ReqMgmtDocument.FinalApprovalDate AS ReqApprovedDate,
DYNAMICS.dbo.ReqMgmtLines.PurchaseOrderDocument AS PONumber, dbo.POP10100.DOCDATE AS PODate, dbo.POP30310.POPRCTNM AS RctNumber
FROM DYNAMICS.dbo.ReqMgmtLines INNER JOIN
DYNAMICS.dbo.SY01500 ON DYNAMICS.dbo.ReqMgmtLines.CompanyID = DYNAMICS.dbo.SY01500.CMPANYID LEFT OUTER JOIN
DYNAMICS.dbo.ReqMgmtDocument ON DYNAMICS.dbo.ReqMgmtLines.DocumentID = DYNAMICS.dbo.ReqMgmtDocument.DocumentID LEFT OUTER JOIN
dbo.POP10100 ON DYNAMICS.dbo.ReqMgmtLines.PurchaseOrderDocument = dbo.POP10100.PONUMBER LEFT OUTER JOIN
dbo.POP30310 ON DYNAMICS.dbo.ReqMgmtLines.PurchaseOrderDocument = dbo.POP30310.PONUMBER
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment