select distinct cho.cho_id affiliationChoId, cho.cho_name affiliateName from tbl_CRM_AffiliationProducts ap inner join tbl_OPR_ClientOperators opr on opr.OperatorID = ap.affiliationOrgID and opr.OwnerID in () and opr.OwnerID = and opr.FSLTableCode = and ap.skuid > 0 and ( ap.startdate is null or startdate <= getdate() ) and ( ap.enddate is null or enddate >= getdate() ) inner join tbl_cho_operators cho on cho.cho_id = opr.fsl_choid order by cho.cho_name
Scan Bar Code