set nocount on update tbl_CDR_ContactDetails set salesRep = , salesManager = , mfrBuyer = , districtId = , managerId = where fspro_userid = and ownerId = and ownerType = select rowsAffected = @@rowcount set nocount off insert into tbl_CDR_ContactDetails ( ownerId, ownerType, fspro_userid, salesRep, salesManager, mfrBuyer, districtId, managerId ) values ( , , , ,, , , ) update tbl_CDR_Distributors set primaryContactId = where cdr_recordId = and ownerId = and fsl_tablecode = update tbl_CDR_Distributors set primaryContactId = where cdr_recordId = and ownerId = and fsl_tablecode =