如何用sqlload导字段类型是number的
展开全部
load data
infile 'result.csv '
into table resultxt
(resultid number load data
infile 'result.csv '
into table resultxt
(resultid number terminated by ', ',
website char terminated by ', ',
ipport char terminated by ', ',
status char terminated by whitespace)
直接在ctl文件里面的字段后面标上number即可,否则自动转为Char。
infile 'result.csv '
into table resultxt
(resultid number load data
infile 'result.csv '
into table resultxt
(resultid number terminated by ', ',
website char terminated by ', ',
ipport char terminated by ', ',
status char terminated by whitespace)
直接在ctl文件里面的字段后面标上number即可,否则自动转为Char。
追问
这样写问什么报错啊SQL*Loader-350: Syntax error at line 13.
Expecting valid column specification, "," or ")", found "number".
card_type number terminated by ', ',
追答
load data
infile 'result.csv '
into table resultxt
(resultid number load data
infile 'result.csv '
into table resultxt
FIELDS TERMINATED BY ','
(resultid number , website char ,ipport char , status char )
使用这个格式试一试
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
你先查询数据类型为number的,语句如下,你参考参考:
SELECT syscolumns.name FROM sysobjects INNER JOIN
syscolumns ON sysobjects.id = syscolumns.id INNER JOIN
systypes ON syscolumns.xtype = systypes.xtype where systypes.name ='number'
and sysobjects.name = '表名'
--如果还要模糊查询字段名,加上下面代码
-- and syscolumns.name like '%字段%'
SELECT syscolumns.name FROM sysobjects INNER JOIN
syscolumns ON sysobjects.id = syscolumns.id INNER JOIN
systypes ON syscolumns.xtype = systypes.xtype where systypes.name ='number'
and sysobjects.name = '表名'
--如果还要模糊查询字段名,加上下面代码
-- and syscolumns.name like '%字段%'
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |