update tbl_OPR_CLientOperators set lastUpdated = , lastUpdatedBy = , [#_field.column#] = where ownerId = and fsltablecode = and operatorId = and lastUpdated = select num_units_thisYr, num_units_lastYr, num_units_nextYr from tbl_OPR_ClientOperators where ownerId = and fsltablecode = and operatorId = update tbl_MFR_TPF_PartnerUnitForecast set unit_qty = where forecast_year = and ownerId = and ownerType = and partnerId = and partnerType = insert into tbl_MFR_TPF_PartnerUnitForecast ( ownerId, ownerType, partnerId, partnerType, forecast_year, unit_qty ) values ( , , , , , ) select f.fieldId, rtrim( ltrim( f.name )) name, rtrim( ltrim( f.category )) category, rtrim( ltrim( f.label )) label, f.type, f.required, f.format, f.config, f.sortRank, f.maxLength from tbl_OPR_Fields f with (nolock) where f.ownerId = and f.ownerType = and f.category = and f.name = update tbl_OPR_FieldValues set data = where partnerId = and partnerType = 'OPR' and fieldId = and valueIndex = 1 insert into tbl_OPR_FieldValues ( fieldId, partnerId, partnerType, data, valueIndex ) values ( , , 'OPR', , 1 ) delete from tbl_OPR_FieldValues where partnerId = and partnerType = 'OPR' and fieldId = delete dd from tbl_OPR_DistributionDetails dd where not exists ( select * from tbl_OPR_ClientOperators opr where opr.ownerId = dd.ownerId and opr.fsltablecode = dd.ownerType and opr.operatorId = dd.operatorId and dd.cdr_recordId in ( opr.distrib1, opr.distrib2 ) ) and dd.ownerId = and dd.ownertype = and dd.operatorId = update tbl_OPR_DistributionDetails set salesRepId = , accountNumber = , avgWeeklyPurchases = where ownerId = and ownerType = and operatorId = and cdr_recordId = insert into tbl_OPR_DistributionDetails ( ownerId, ownerType, operatorId, cdr_recordId, salesRepId, accountNumber, avgWeeklyPurchases ) values ( , , , , , , ) delete from tbl_CRM_PartnerURLs where ownerId = and ownerType = and partnerType = 'OPR' and urlType = and partnerId = update tbl_CRM_PartnerURLs set urlValue = where ownerId = and ownerType = and partnerType = 'OPR' and partnerId = and urlType = insert into tbl_CRM_PartnerURLs (ownerId, ownerType, partnerId, partnerType, urlType, urlValue) values ( , , , 'OPR', , ) select territoryId,operatorId,mfr_bsr_id,oprType,address,address2,city,state,zipCode,tradeEnabled from tbl_OPR_ClientOperators opr with (nolock) where ownerId = and fsltablecode = and operatorId =