错误代码:1292截断了不正确的双精度值

vyswwuz2  于 2021-06-20  发布在  Mysql
关注(0)|答案(1)|浏览(550)

我试图通过以下查询插入数据:

insert into email (emailAddress, isPreferredEmail, customer_id, upload_id)
select cast(Email as char(100)) a,
       TRUE,
       (select id from customer c where c.dbvehregno=ChassisNo),
       uploadid
  from hyundaiindividualreport
 where id in (select max(id) 
                from hyundaiindividualreport 
               where length(Email>=5) 
                 and uploadid=900 
               group by ChassisNo);

但它在扔:

Error Code: 1292. Truncated incorrect DOUBLE value

电子邮件表结构:

Table: email
Columns:
email_Id bigint(20) AI PK, 
emailAddress varchar(300) ,
isPreferredEmail bit(1) ,
updatedBy varchar(255) ,
customer_id bigint(20) ,
upload_id varchar(255)
p1tboqfb

p1tboqfb1#

此表达式看起来不正确:

length(Email >= 5)

我想你的意思是:

length(Email) >= 5

然而,它在mysql中会产生这种特殊的错误,这似乎令人惊讶。

相关问题