Auto detect datatypes
oraLaroOct 18 2012 — edited Oct 18 2012I 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.