Query Statement
declare @CUSTNMB char(21)
set @CUSTNMB = 'L4'
SELECT SOP30200.CUSTNMBR, SOP30200.COMMNTID, SOP30200.SOPNUMBE, SOP30200.ORIGNUMB, SOP30200.DOCDATE, SOP30200.BACHNUMB,
SOP30200.CUSTNAME, SOP30300.ITEMNMBR, SOP30300.ITEMDESC, SOP30300.QUANTITY, SOP30300.UNITCOST, SOP30300.EXTDCOST
FROM SOP30200 INNER JOIN
SOP30300 ON SOP30200.SOPTYPE = SOP30300.SOPTYPE AND SOP30200.SOPNUMBE = SOP30300.SOPNUMBE
WHERE (SOP30200.CUSTNMBR LIKE '%'+ @CUSTNMB+'%' ) AND (SOP30200.COMMNTID = 'PURG 8/23/2010')
|