--select statement that returns the intersection of the
--records and the values from each table
SELECT A.SOPNUMBE, A.LNITMSEQ, A.ITEMNMBR, B.SOPNUMBE, B.LNITMSEQ, B.COMMENT_1
FROM SOP10200 A
LEFT OUTER JOIN SOP10202 B ON A.SOPNUMBE = B.SOPNUMBE AND A.LNITMSEQ = B.LNITMSEQ
WHERE A.SOPNUMBE = '2050092' AND
A.COMMNTID = 'L' AND
B.COMMENT_1 IS NOT NULL
|