Use the following...SELECT BSMT.PCode, VPROD.PNAME, BSMT.SerialNo, BSMT.Wgt, MIN(Rawdata.ProductionDate) as MinDate, MAX(Rawdata.ProductionDate) AS MaxDate FROM BSMT INNER JOIN APP_SRV.exportDoc.dbo.VPROD VPROD ON BSMT.PCode = VPROD.PCODE LEFT OUTER JOIN ScaleData.dbo.Rawdata Rawdata ON RIGHT(RTRIM (SerialNumID), 6) = BSMT.SerialNo WHERE BSMT.OrderNo = '48343' AND BSMT.Date = '03/07/02' GROUP BY BSMT.PCode, VPROD.PNAME, BSMT.SerialNo, BSMT.Wgt ORDER BY BSMT.PCode
Left outer joins basically return all rows from the table on the "left" of the join (in your case from BSMT) regardless of whether it matches the table on the "right" of the join via the ON clause. Where there is no match the joined fields (ie from Rawdata) will be NULL.Right outer joins just work in the other direction.============The Dabbler!