从MSSQL 2008数据库中读取转入MYSQL里,当有特殊字符保存时就失败

weixin_42082593 2019-08-15 11:08:46
大家好,请问一个问题,从MSSQL 2008数据库中读取转入MYSQL里,当有特殊字符保存时就失败,提示如下: SQLSTATE = S1000
[MySQL][ODBC 5.1 Driver][mysqld-5.5.48]Incorrect string value: '\xFC\xAD\xBC\xC3\xB4\xE5...' for column 'PDETAIL' at row 1

No changes made to database.

INSERT INTO fdcp_source.PATIENT ( clinic_organ_code, clinic_organ_name, patient_domain_id, patient_domain_name, patient_local_id, patient_organ_id, outpatient_no, inpatient_no, id_type, id_number, health_file_no, idcard, health_card_no, name, birth_date, age, age_unit, gender, gender_name, pub_card_division, patient_type, nationality_code, nationality_name, hometown_province, hometown_city, birth_province, birth_city, birth_country, nation, nation_name, marriage_code, marriage_name, education, education_name, occupation_code, occupation_name, phone_number, email, paprovince, pacity, pacounty, patown_ship, pastreet, pahouse_number, papost_code, pdetail, hrprovince, hrcity, hrcounty, hrtown_ship, hrstreet, hrhouse_number, hrpost_code, hdetail, unit_name, uaprovince, uacity, uacounty, uatown_ship, uastreet, uahouse_number, unit_post_code, udetail, unit_phone, contact_name, contact_relation_code, contact_relation_name, caprovince, cacity, cacounty, catown_ship, castreet, cahouse_number, ca_post_code, cdetail, contact_phone, death_date, create_date, update_date, idcard_farm, idcard_hos, revise_sign, ID ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ) MYSQL建表时字符编码已经是utf8, 在网上搜索类似的解决方法,是修改字符集为utf8mb4。MySQL 版本是Server 5.5 ,但改了一直还是不行,请问有哪里大哥有处理过类型的问题,请指点,谢谢
...全文
61 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

609

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder DataWindow
社区管理员
  • DataWindow社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧