在SQLPLUS中执行以下UPDATE语句
update t_base_change_sql
set SQL_SENTENCE='mERGE INTO T04_CUSTOMER_MANAGER a USING (SELECT DISTINCT sys_id, custmer_manager_id, party_id, sys_org_id, id_info_type_cd, id_info_txt, cust_manager_name, gender_cd, birth_dt, address_desc, tel_num, contact_psn_name, contact_psn_telnum, office_telnum, customer_manager_mobilenum, active_ind, parent_cust_mgr_id, email_address, company_name, company_address, corp_postcode, curr_work_bgn_dt, postbank_attr_cd, post_speciality_cd, close_dt FROM t_swap_CUSTOMER_MANAGER WHERE mms_tools.APFChgDtNumToChar(etl_date) = :sSumDate) b ON (a.sys_id = b.sys_id and a.custmer_manager_id=b.custmer_manager_id and a.sys_org_id=b.sys_org_id) WHEN MATCHED THEN UPDATE SET a.party_id = b.party_id, a.id_info_type_cd = b.id_info_type_cd, a.id_info_txt = b.id_info_txt, a.cust_manager_name = b.cust_manager_name, a.gender_cd = b.gender_cd, a.birth_dt = b.birth_dt, a.address_desc = b.address_desc, a.tel_num = b.tel_num, a.contact_psn_name = b.contact_psn_name, a.contact_psn_telnum = b.contact_psn_telnum, a.office_telnum = b.office_telnum, a.customer_manager_mobilenum = b.customer_manager_mobilenum, a.active_ind = b.active_ind, a.parent_cust_mgr_id = b.parent_cust_mgr_id, a.email_address = b.email_address, a.company_name = b.company_name, a.company_address = b.company_address, a.corp_postcode = b.corp_postcode, a.curr_work_bgn_dt = b.curr_work_bgn_dt, a.postbank_attr_cd = b.postbank_attr_cd, a.post_speciality_cd = b.post_speciality_cd, a.close_dt = b.close_dt, a.etl_date = mms_tools.ApfChgDtCharToNum(:sSumDate), a.last_modify_tlr_id = ''999999999'', a.last_modify_prg_id = :s_sp_name, a.last_modify_tm = mms_ge.APFGetSysTm19 WHEN NOT MATCHED THEN INSERT (sys_id, custmer_manager_id, party_id, sys_org_id, id_info_type_cd, id_info_txt, cust_manager_name, gender_cd, birth_dt, address_desc, tel_num, contact_psn_name, contact_psn_telnum, office_telnum, customer_manager_mobilenum, active_ind, parent_cust_mgr_id, email_address, company_name, company_address, corp_postcode, curr_work_bgn_dt, postbank_attr_cd, post_speciality_cd, close_dt, etl_date, last_modify_tlr_id, last_modify_prg_id, last_modify_tm) VALUES (b.sys_id, b.custmer_manager_id, b.party_id, b.sys_org_id, b.id_info_type_cd, b.id_info_txt, b.cust_manager_name, b.gender_cd, b.birth_dt, b.address_desc, b.tel_num, b.contact_psn_name, b.contact_psn_telnum, b.office_telnum, b.customer_manager_mobilenum, b.active_ind, b.parent_cust_mgr_id, b.email_address, b.company_name, b.company_address, b.corp_postcode, b.curr_work_bgn_dt, b.postbank_attr_cd, b.post_speciality_cd, b.close_dt, mms_tools.ApfChgDtCharToNum(:sSumDate), ''999999999'', :s_sp_name, mms_ge.APFGetSysTm19)'
where SENTENCE_ID='00026';
上面语句是更新一个表中的字段内容,字段的类型是LONG类型。字段内容长度是2640个字符左右。
此语句在PL/SQL工具中运行成功,但是在SQLPLUS中执行报“ORA-01756: 引号内的字符串没有正确结束”错误!
因此,可以判断此语句是没有问题的!但是为何在SQLPLUS中执行会报错呢?我估计是有些参数没有设置好。但是我不知道应该设置哪些参数去避免这个问题。请高手指点~~!谢谢~~在线等