Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help with view

Status
Not open for further replies.

itasueb

MIS
Mar 11, 2005
29
US
created a view from great plains data to be used in crystal 8.5

what is happening is that some of my invoices (SOPNUMBE) are doubling itemnumber, accounts, description and amounts

but only occassionaly

Rest are pulling correctly.

Please let me know if I've missed something

Here's my view:

CREATE VIEW dbo.crystal_test
AS
SELECT dbo.IV00101.ITEMDESC, dbo.IV00101.ITMCLSCD, dbo.RM00101.CUSTNMBR, dbo.RM00101.CUSTNAME, dbo.SOP30200.DOCDATE,
dbo.SOP30200.GLPOSTDT, dbo.SOP30200.MSTRNUMB, dbo.SOP30200.SLPRSNID, dbo.SOP30200.VOIDSTTS, dbo.SOP30300.SOPTYPE,
dbo.SOP30300.SOPNUMBE, dbo.SOP30300.ITEMNMBR, dbo.SOP30300.UNITPRCE, dbo.SOP30300.XTNDPRCE, dbo.SOP30300.QUANTITY,
dbo.GL00100.ACTNUMBR_1, dbo.GL00100.ACTNUMBR_2, dbo.GL00100.ACTNUMBR_3, dbo.GL00100.ACTNUMBR_4, DB_NAME(13) AS dbname,
dbo.GL00100.ACTINDX
FROM dbo.SOP10102 INNER JOIN
dbo.SOP30300 ON dbo.SOP10102.SOPTYPE = dbo.SOP30300.SOPTYPE AND
dbo.SOP10102.SOPNUMBE = dbo.SOP30300.SOPNUMBE RIGHT OUTER JOIN
dbo.GL00100 ON dbo.SOP10102.ACTINDX = dbo.GL00100.ACTINDX LEFT OUTER JOIN
dbo.IV00101 ON dbo.SOP30300.ITEMNMBR = dbo.IV00101.ITEMNMBR LEFT OUTER JOIN
dbo.SOP30200 INNER JOIN
dbo.RM00101 ON dbo.SOP30200.CUSTNMBR = dbo.RM00101.CUSTNMBR ON dbo.SOP30300.SOPTYPE = dbo.SOP30200.SOPTYPE AND
dbo.SOP30300.SOPNUMBE = dbo.SOP30200.SOPNUMBE
WHERE (dbo.GL00100.ACTNUMBR_1 = '4100')

thanks
Sue
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top