Bulk Load data without specifying column names in control file
733121Nov 9 2009 — edited Nov 9 2009I am totally new to the world of Oracle databases and am having some trouble doing some basic data imports from a csv file. I have a large amount of data in an excel spreadsheet (a couple hundred columns by varying numbers of rows from 2- several thousand) which I want to import into my Oracle 11g Database. Currently I am trying to use sql loader and specify the import syntax in the control file. From the examples I've seen so far, it seems you must specify the columns individually for what you are importing. This is simply not reasonable for several hundred columns of data.
Is there sql loader syntax (or a better method all together) to import a comma delimited csv or excel spreadsheet into an oracle database where it automatically generates a table and columns based on the data in the target import file? Even if I must first create the table in the database, my key issue is being able to generate the column names during import to match the column headers in the import file. I appreciate any help you could provide.
FYI here is my first meager attempt at importing a comma delimited csv, here is my ctl file:
load data
infile 'C:\filepath\mock_data.csv'
into table allData
fields terminated by "," optionally enclosed by '"'
It says Syntax error at line 4. Expecting "(", found end of file.
I suspect there is more at issue here than a missing "("