Skip to Content
Aug 29, 2018 at 01:57 PM

Query Wrong output


Hi all,

I'm trying to run query below but the line item is doubleb trippled etc, i dont why. anyone can help me please:

SELECT T0.Docentry[DocEntry], T0.[comments], T0.[DocDate],T0.[ref2], T0.[DocNum],

T1.[itemcode], T1.[Dscription], T1.[Quantity], T1.[UomCode], T1.[whscode],

(select ISNULL(U_Name,'') from OUSR where UserID=T0.UserSign) [Users],

OBIN.BinCode, OBIN.Descr

FROM OIGE T0 INNER JOIN IGE1 T1 ON T0.[DocEntry] = T1.[DocEntry]

Inner Join OILM On OILM.DocEntry = T1.DocEntry

Inner Join OBTL On OILM.MessageID = OBTL.MessageID Inner Join OBIN On OBTL.BinAbs = OBIN.AbsEntry

Inner Join OINM On OINM.TransType = OILM.TransType And OINM.CreatedBy = OILM.DocEntry

Where OILM.TransType = 60

order by LineNum asc