select partnerid, partnertype from tbl_spl_opportunities where ownerid = and ownertype = and opportunityid = select taskid from tbl_wrk_tasks where ownerid = and ownertype = and subjecttype = 'spl' and subjectid = and disposition <> 'X'