select cdr.cdr_dstName, cdr.focusAccount, cdr.cdr_dstaddress1, cdr.cdr_dstcity, cdr.cdr_dststate, cdr.cdr_dstzip, mbr.firstName, mbr.lastName, mbr.email, mbr.phone contactPhone, mbr.title, mbr.caJobFunction from tbl_CDR_Distributors cdr inner join tbl_FSPro_members mbr on mbr.fspro_userid = cdr.primaryContactId and mbr.ownerid = cdr.ownerId and mbr.fsl_tablecode = cdr.fsl_Tablecode inner join tbl_CDR_Classifications cls on cls.classificationId = cdr.classificationId and cls.ownerId = cdr.ownerId and cls.ownerType = cdr.fsl_tablecode where cdr.ownerId = and cdr.fsl_tablecode = and cdr.cdr_recordId = select * from qmd_productStatus where mktCategoryId = and mktSubCategoryId =