Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Auto detect datatypes

oraLaroOct 18 2012 — edited Oct 18 2012
I have frequent requests to create new table based on a datafile. Has anyone found a way to detect column count and data type in a file and load it?

any tool is usable ( batch or linux shell script, utl, plsql, sqlldr) just as long as I can automate as much as possible.

Here is a typical file format with mixed datatypes.. How could I automate loading this file into a table without knowing the data or the column names or amount of columns before receiving the file where all I want to do is pass in name of file and new_table_name.

col1, col2, col3
10/10/2012, A, 1


Id have to accept some leeway in guessing the datatype, e.g. not sure then set varchar, but I do that anyway. thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 15 2012
Added on Oct 18 2012
8 comments
437 views