使用loader 为什么第一行的数据导不进去表中?

czm3984325 2011-11-10 03:01:51
@pdserver_local control=F:\XX\TBL_LRTEMPIN.ctl log=TBL_LRTEMPIN.log bad=TBL_LRTEMPIN.bad skip=1

load data infile 'F:\DATELOAD\2016.csv' insert into table TBL_LRTEMPIN
truncate fields terminated by "," optionally enclosed by "'"
trailing nullcols (字段1,字段2)

excel:
字段1 字段2
1 2
11 22
111 222

我的
11 22
111 222
能进入表里,可是1,2这行数据进不去?为什么啊?
我也换使用过,append、replace 但是还是不好事,求高手!

...全文
108 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
czm3984325 2011-11-12
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 yixilan 的回复:]

不知道。我的ctl
load data Append into table test_yixl
truncate fields terminated by "," optionally enclosed by "'"
trailing nullcols (t1,t2)
我的csv
t1,t2
1,2
11,22
111,222
我的命令:
sqlldr USERID=app……
[/Quote]

你那个csv导入的格式固定么?我想实现字段不变,但是字段的顺序可以任意!
czm3984325 2011-11-10
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 yixilan 的回复:]

不知道。我的ctl
load data Append into table test_yixl
truncate fields terminated by "," optionally enclosed by "'"
trailing nullcols (t1,t2)
我的csv
t1,t2
1,2
11,22
111,222
我的命令:
sqlldr USERID=app……
[/Quote]

谢谢 我忘记看log 找找原因了。
yixilan 2011-11-10
  • 打赏
  • 举报
回复
不知道。我的ctl
load data Append into table test_yixl
truncate fields terminated by "," optionally enclosed by "'"
trailing nullcols (t1,t2)
我的csv
t1,t2
1,2
11,22
111,222
我的命令:
sqlldr USERID=apps/apps@vis control=test.ctl DATA=test.csv log=test.log
我的表结构:
create table test_yixl(t1 varchar2(10), t2 varchar2(10));
运行之后,完全好用。
czm3984325 2011-11-10
  • 打赏
  • 举报
回复
skip跳过 不是指的跳过表头么?我也试过了 skip=1 去掉了 但是还是不是不行!
yixilan 2011-11-10
  • 打赏
  • 举报
回复
[Quote=引用楼主 czm3984325 的回复:]
@pdserver_local control=F:\XX\TBL_LRTEMPIN.ctl log=TBL_LRTEMPIN.log bad=TBL_LRTEMPIN.bad skip=1
[/Quote]
skip=1
跳过第一行数据。。。

17,137

社区成员

发帖
与我相关
我的任务
社区描述
Oracle开发相关技术讨论
社区管理员
  • 开发
  • Lucifer三思而后行
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧