oracle 如何在通过sql loader导入excel文件时删除数据库中的标题
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18189167/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to remove headers in database while importing the excel file through sql loader
提问by Nishant
I have a excel sheet which has a format like:
我有一个 excel 表格,其格式如下:
Name Address Phone# Age ----- ------- ------ ---- aaa xxx 123... 11 bbb yyy 345... 21
when i import this excel i have got headers(Name,Address,phone#,Age) as first row of the table.
当我导入这个 excel 时,我有标题(姓名、地址、电话号码、年龄)作为表格的第一行。
i want only data without headers.
我只想要没有标题的数据。
Can anyone please help.
任何人都可以请帮忙。
TA,
TA,
Nishant
尼尚
回答by Ed Gibbs
I've never used it, but the skip
optionshould do what you need.
我从未使用过它,但该skip
选项应该可以满足您的需求。
You can define the number of rows to skip in your control
file like this:
您可以定义要在control
文件中跳过的行数,如下所示:
OPTIONS (SKIP=1)
LOAD DATA INFILE ...
Or you can do it at the command like like this:
或者您可以像这样在命令中执行此操作:
sqlldr userid=xxxx/yyyy control=mycontrolfile.ctl skip=1
回答by byteboy
Its very simple. Open your Excel file [in Excel 2010 there is a tab called Desgin] click on the Grid or Table which populated by Database records. Now See the design tab under "Table Tools" heading is visible on the top. Click on it.
它非常简单。打开您的 Excel 文件 [在 Excel 2010 中有一个名为 Desgin 的选项卡] 单击由数据库记录填充的表格或表格。现在查看顶部的“表格工具”标题下的设计选项卡。点击它。
There are four checkboxes on of them named as: Header Row, unchecked it and you have the Table withou header.
其中有四个复选框命名为:标题行,取消选中它,您就有了没有标题的表格。