`

Truncated incorrect DOUBLE value解决办法

    博客分类:
  • sql
 
阅读更多

项目在操作 MYSQL 数据库一 VARCHAR 字段时出现“ 1292 truncated incorrect double value ”错误。

 

MYSQL 手册上写着:

错误: 1292 SQLSTATE: 22007 (ER_TRUNCATED_WRONG_VALUE)

消息:截短了不 正确的 %s 值 : '%s'

 

什么号截短了不 正确的的 %s 值 ? 难道还不允许直接为 null 或者直接赋值。思考再三不解。最后在网上发现一些 其他的可能与之相关的情况,不过也不完全一样。他人的情况多为字符串相加错误地采用了“ + ”,而不是库函数“concat ”。利用此方法将字段串相加即解决了。但关键 是我的问题是直接赋值,而不是进行字符串连接。真搞不懂。最后还是采用了 concat 函数: concat(Str,’’) 来变相的解决了。

分享到:
评论

相关推荐

    MySQL中字符串与Num类型拼接报错的解决方法

    发现问题 图片地址如下 ...需要实现的效果是要加上尺寸,如以下效果 ...一开始想当然使用 UPDATE tag_group SET cover = cover + '|...Data truncation: Truncated incorrect DOUBLE value: ‘http://huoche.7234.cn/im

    mysql基于正则实现模糊替换字符串的方法分析

    本文实例讲述了mysql基于正则实现模糊替换字符串的方法。分享给大家供大家参考,具体如下: ...执行之后,报错:Truncated incorrect DOUBLE value 解决办法,经过查询发现是concat(Str,'')函数错误问题

    使用Mysql5.x以上版本出现报错#1929 Incorrect datetime value: ”” for column ”createtime”的快速解决方法

    在MySQL 5.x及以上版本中,用户可能会遇到错误#1929,提示"Incorrect datetime value: '' for column 'createtime'"。这个错误通常出现在尝试插入或更新包含日期时间值的列时,如果该列的值为空,而数据库配置不允许...

    Delphi7.1 Update

    * TClientDataSet.ChangeCount will return an incorrect value when editing the value of a TStringField or a TWideStringField and then reverting it to the original value (Quality Central 2717 & 4508)....

    BURNINTEST--硬件检测工具

    2) Double click (or Open) the downloaded ".exe" file 3) Follow the prompts UnInstallation ============== Use the Windows control panel, Add / Remove Programs Requirements ============ - Operating ...

    OutlookAttachView v2.73

    OutlookAttachView displayed empty image or incorrect image. * Version 2.66 o Added more accelerator keys (in the menus). * Version 2.65 o Added 'Image Preview' option (Under the View menu). If ...

Global site tag (gtag.js) - Google Analytics