here is my query I need to select destinct sopnumbe.. thanks for any help select a.sopnumbe, b.itemnmbr, b.itemdesc, a.bachnumb, a.invodate, a.cstponbr, a.duedate, b.quantity, b.unitprce, c.cmmttext, /* txt field */ a.locncode from dbo.boa_sop_header_vw a left join dbo.boa_sop_lines_vw b on a.sopnumbe = b.sopnumbe left join dbo.boa_sop10202_vw c on c.sopnumbe = b.sopnumbe and b.soptype = c.soptypeWHERE a.custnmbr = 'BOA0028892'AND cmmttext like '%%PU@%'