Toad World® Forums

How to create a table from a fixed length file?

Is there a means to take a fixed length ascii file and build a sqlloader control file that could then in turn be used to build the Oracle target table?

The sqlloader utility allows me to view the text file and mark the fixed length fields, however I need to have a target table already created to go any further. I thought in the past I could choose to just create a control file…

Essentially looking for fastest way to get from file to table.

Any help greatly appreciated,
Thanks,
Dan

Essentially looking for fastest way to get from file to table.

The fastest way I can think of – in your specific instance would be to use
the header in the data file to create a table defaulting all the datatypes to
varchar of sufficient width to handle the fixed width in the data file.

Of course… if you don’t have a header in the data file, then you get
to put in more work effort by naming the columns. Lots of other assumptions are
involved which if incorrect mean more work effort :slight_smile:

Roger S.

Maybe going down this road?

http://www.dba-oracle.com/t_sql_loader_sqlldr_external_tables.htm