How to remove headers in database while importing

2020-04-19 05:21发布

问题:

I have a excel sheet which has a format like:

 

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.

i want only data without headers.

Can anyone please help.

TA,

Nishant

回答1:

I've never used it, but the skip option should do what you need.

You can define the number of rows to skip in your control file like this:

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


回答2:

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.

There are four checkboxes on of them named as: Header Row, unchecked it and you have the Table withou header.