1、最近的kettle的数据交换配置,启动kettle引起的错误,如下所示:

 |ERROR|ERROR:  missing data for column "createtime"  (seg3 slice1 192.168.66.23: pid=)

引发这个错误,并不是这个字段引起的错误,一般是这个字段临近的字段存在空格或者换行符引发的错误。

2、引发这个错误,并不是这个字段引起的错误,一般是这个字段临近的字段存在空格或者换行符引发的错误。为了问题重现,我新建一个数据库和数据表:

3、准备插入的正常数据,可以执行多条插入数据:

 insert into user(name,age,birthday,sex) VALUES("张三",,"2018-08-20","男");
insert into user(name,age,birthday,sex) VALUES("李四",,"2018-8-20","男");
insert into user(name,age,birthday,sex) VALUES("王五",,"2018-8-20","男");
insert into user(name,age,birthday,sex) VALUES("赵六",,"2018-8-20","男");
insert into user(name,age,birthday,sex) VALUES("李白",,"2018-8-20","男");
insert into user(name,age,birthday,sex) VALUES("安琪拉",,"2018-8-20","女");
insert into user(name,age,birthday,sex) VALUES("亚瑟",,"2018-8-20","男");
insert into user(name,age,birthday,sex) VALUES("鲁班",,"2018-8-20","男");

然后执行查询结果是没有查询结果的:

CONCAT(str1,str2,…) 返回结果为连接参数产生的字符串。

4、然后插入一条换行的数据:

换行的数据可以如下所示造几条,这里造一条。

然后执行

insert into user(name,age,birthday,sex) VALUES("后
裔",14,"2018-8-20","男");

5、然后可以看到已经查询出来了这条换行的数据。

6、mysql函数。replace(string_expression , string_pattern , string_replacement),第一个参数:要查找的字段。第二个参数:要查找的字符。第三个参数:要替换成的字符。char(10)换行键。char(13)回车键。你会发现字段名称like 的concat里面是char(10)和char(13)都可以进行查询出结果的。

7、我要的结果就是将带有换行和回车的字符处理掉,然后执行交换。其他使用情况以后用到再贴。

8、最后说一下,这里是name的字段,本不该出现回车和换行符的,如果是其他长文本字段,可以使用如下命令:

 -- 将char()换行键,char()回车键换成@#r;和@#n;
select REPLACE(REPLACE(name, char(), '@#r;'), char(), '@#n;') as name from user where name like CONCAT("%",char(),"%") -- 将@#r;和@#换成nchar()换行键,char()回车键;
select REPLACE(REPLACE(name, '@#r;', char()), '@#n;', char()) as name from user where name like CONCAT("%",char(),"%")

待续......

|ERROR|ERROR: missing data for column "createtime" (seg3 slice1 192.168.66.23:40001 pid=33370)之mysql换行符或者空格引起的问题的更多相关文章

  1. loadrunner:Action.c(4): Error -27796: Failed to connect to server "192.168.66.3:8080": [10060] Connection timed out

    Action.c(4): Error -27796: Failed to connect to server "192.168.66.3:8080": [10060] Connec ...

  2. MySQL Error 1170 (42000): BLOB/TEXT Column Used in Key Specification Without a Key Length【转】

    今天有开发反应他的建表语句错误,我看了下,提示: MySQL Error 1170 (42000): BLOB/TEXT Column Used in Key Specification Withou ...

  3. 插入中文错误ERROR 1406 (22001): Data too long for column 'name' at row 1

    1.在导入数据前执行以下命令即可:set SESSION sql_mode=''; 通过设置sql_mode变量更改模式.linux下安装完mysql后,默认的sql-mode值是空,在这种情形下my ...

  4. MySQL插入中文时出现ERROR 1406 (22001): Data too long for column 'name' at row 1 (转)

    使用命令行方式登陆到MySQL服务器, 建立一个数据库,数据库编码设为UTF-8.此时,如果直接在命令行窗口使用insert语句插入中文,就遇到类似 ERROR 1406 (22001): Data ...

  5. error items-9022:missing required icon file.the bundle does not contain an app icon for iPhone/iPad Touch of exactly '120x120' pixels,in.pen format for ios versions >= 7.0

    error items-9022:missing required icon file.the bundle does not contain an app icon for iPhone/iPad ...

  6. SQL logic error or missing database no such table: xxx

    原文:SQL logic error or missing database no such table: xxx System.Data.SQLite.SQLiteException (0x8000 ...

  7. 如何解决:ERROR: the user data image is used by another emulator. aborting 的问题

    问题概述: 在启动Android模拟器时出现以下错误,导致启动失败. ERROR: the user data image is used by another emulator. aborting. ...

  8. imagecreatefromjpeg(): gd-jpeg, libjpeg: recoverable error: Corrupt JPEG data: 1 extraneous bytes be

    imagecreatefromjpeg(): gd-jpeg, libjpeg: recoverable error: Corrupt JPEG data: 1 extraneous bytes be ...

  9. error on line 1 at column 6: XML declaration allowed only at the start of the document

    This page contains the following errors: error on line 1 at column 6: XML declaration allowed only a ...

随机推荐

  1. 工作流程引挈 https://www.flowable.org/

    工作流程引挈 :   https://www.flowable.org/ 起源:JBPM,Activiti

  2. 两种 AuthorizationSchemes 在 ASP.NET Core 2

    Welcome to IdentityServer4:  https://identityserver4.readthedocs.io/en/release/   支持 ASP.NET Core 2 ...

  3. win10 python27pyhton36共存

    先前安装了python36 然后安装python27,安装步骤如下 1. 到官网下载https://www.python.org/downloads/windows/,我的是win10 64位,选择了 ...

  4. xpath 中 [<Element a at 3985984dj343>]

    在写爬虫用xpath抓取数据的时候出现了这个问题,列表中都是很多个 < element > 首先这不是报错,也不是你的xpath语法有错. 将这个数据列表循环,循环出的item就是你想要的 ...

  5. HTTP笔记01-http相关的基础知识

    这个系列文章是阅读<图解HTTP>后写下的笔记 当我们在浏览器输入url,点击回车后,浏览器显示我们需要的web页面,那么,这个界面是如何产生的? 根据浏览器地址中输入的url,浏览器从相 ...

  6. Python3学习笔记31-xlrd模块

    xlrd模块是用来读取excel的第三方模块,需要下载安装后才能使用.新建一个excel,随便填充一些数据用来测试下. ​ # -*- coding: utf-8 -*- import xlrd #打 ...

  7. 设计模式C++学习笔记之二(Proxy代理模式)

      代理,一看名字就知道这只是个中介而已,真实的执行者在代理的后面呢.cbf4life在他的书里提的例子也很有趣,更详细的内容及说明可以参考原作者博客:cbf4life.cnblogs.com.现在贴 ...

  8. web@css引入方式,基本选择器,3大特性,高效运行

    4.高效的css 所谓高效就是让浏览器查找更少的元素标签来确定匹配的style元素.      1.不要再ID选择器前使用标签名        解释:ID选择是唯一的,加上标签名相当于画蛇添足了,没必 ...

  9. sugarCRM文档翻译1

    2018-3-9 14:42:14 星期五 本文分两部分: 第一部分是从index.php入口开始的代码执行的部分流程 第二部分是对官方文档的翻译 第一部分: 流程: 入口文件: index.php ...

  10. RabbitMQ:MSVCR120.dll ,c000001d 错误

    今天在win7上面安装RabbitMQ,安装过程没有问题,但是RabbitMQ无法启动,错误如下: 今多方查找,原因在于win7没有安装SP1的补丁包,安装完成后,启动RabbitMQ就没有问题了. ...