linux下db2导入csv文件脚本,从文件csv导入db2(db2 import from file csv)

在Linux环境中使用DB2导入CSV文件时遇到问题,数据未正确显示。问题在于CSV文件使用分号作为分隔符,而DB2默认使用逗号。解决方案是使用COLDEL参数指定分隔符,例如`db2 import from "ABC.csv" OF DEL MODIFIED BY COLDEL; insert into abc(id,id2)`。" 8945841,1314309,C++实现无锁队列,"['C++编程', '并发控制', '数据结构', '内存管理', '多线程']
摘要由CSDN通过智能技术生成

从文件csv导入db2(db2 import from file csv)

我做了一个简单的例子,但它不起作用。 我连接到示例数据库

我的文件是ABC.csv

1; 2

2; 3

db2 import from "ABC.csv" OF DEL insert into abc(id,id2)

导入找到行,它说插入。

但是如果db2 select * from abc没有数字出现但是' - '

id id2

_ _

_ _

为什么?

表abc创建为(id int,id2 int)

I made a simple example, but it does not work. I connect to sample database

my file is ABC.csv

1;2

2;3

db2 import from "ABC.csv" OF DEL insert into abc(id,id2)

the import found the rows and it says that inserted.

but if db2 select * from abc no numbers appear but '-'

example

id id2

_ _

_ _

why?

the table abc is create as (id int, id2 int)

原文:https://stackoverflow.com/questions/35553959

更新时间:2

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值