原代码:

    1. insert into trade_head_5801errordata(id,type,trade_id,transaction_id,organization_id,application_id,account_id,open_id,product_id,subject,payment_contract_id,product_contract_id,fee_type,fee,bank_type,request_invoice,status,attach,remark,create_by,create_at,create_mode,delete_by,delete_at,import_no,product_name,account_type,donator_id,pay_at,bill_status,confirm_status,donator_count,pay_type,account_no,identity,sex,birthday,country,mobile,region,address,zipcode,email,occupation,industry,contact_name,contact_mobile,contact_email,raise_funds_department,update_at,update_by,telephone,trade_source,to_nc_status,to_nc_PCNo,account_name,invoice_status,is_history)
    2. select id,type,trade_id,transaction_id,organization_id,application_id,account_id,open_id,product_id,subject,payment_contract_id,product_contract_id,fee_type,fee,bank_type,request_invoice,status,attach,remark,create_by,create_at,create_mode,delete_by,delete_at,import_no,product_name,account_type,donator_id,pay_at,bill_status,confirm_status,donator_count,pay_type,account_no,identity,sex,birthday,country,mobile,region,address,zipcode,email,occupation,industry,contact_name,contact_mobile,contact_email,raise_funds_department,update_at,update_by,telephone,trade_source,to_nc_status,to_nc_PCNo,account_name,invoice_status,is_history
    3. from trade_head
    4. where `status` = 1
    5. and `account_no` = 1299565801
    6. and `create_at` >= '2021-07-01 00:00:00' AND `create_at` <= '2021-10-08 23:59:59'

    原错误:

    1. Data truncation: Truncated incorrect DOUBLE value: 'yuejuan@fupin.org.cn'【解决方法】:https://help.aliyun.com/document_detail/211560.html
    2. TraceId : 0a981dee16337822204872770e2c3c

    分析:
    account_no是varchar类型,但右边是数值类型,查询时,会自动把account_no转为double,导致account_no中,非数值的值,转换出错

    解决方案:

    1. insert into trade_head_5801errordata(id,type,trade_id,transaction_id,organization_id,application_id,account_id,open_id,product_id,subject,payment_contract_id,product_contract_id,fee_type,fee,bank_type,request_invoice,status,attach,remark,create_by,create_at,create_mode,delete_by,delete_at,import_no,product_name,account_type,donator_id,pay_at,bill_status,confirm_status,donator_count,pay_type,account_no,identity,sex,birthday,country,mobile,region,address,zipcode,email,occupation,industry,contact_name,contact_mobile,contact_email,raise_funds_department,update_at,update_by,telephone,trade_source,to_nc_status,to_nc_PCNo,account_name,invoice_status,is_history)
    2. select id,type,trade_id,transaction_id,organization_id,application_id,account_id,open_id,product_id,subject,payment_contract_id,product_contract_id,fee_type,fee,bank_type,request_invoice,status,attach,remark,create_by,create_at,create_mode,delete_by,delete_at,import_no,product_name,account_type,donator_id,pay_at,bill_status,confirm_status,donator_count,pay_type,account_no,identity,sex,birthday,country,mobile,region,address,zipcode,email,occupation,industry,contact_name,contact_mobile,contact_email,raise_funds_department,update_at,update_by,telephone,trade_source,to_nc_status,to_nc_PCNo,account_name,invoice_status,is_history
    3. from trade_head
    4. where `status` = 1
    5. and `account_no` = '1299565801'
    6. and `create_at` >= '2021-07-01 00:00:00' AND `create_at` <= '2021-10-08 23:59:59'