You have to specify what specify what separated the file is. You have to create a dynamic PL/SQL to handle that, there is no easy way out.
For the second part of your question about reading file in totality rather than line by line... I GUESS NOT.
I CAN give you sample file for reading any "separated" file but I guess you use your sweat a bit to find out that, isn't life full of thorns ? If you can't get to it please let me know I'll create a Proc for you. Best Of luck...
Originally posted by kondaoracle
Thats good idea..
Any sample script available for that...coz some care to be taken when handling null values.
1. The file to be imported may be comma separated
2. The file to be imported may be tab separated.
3. The file to be imported may be some spaces separated.
Is there any other way except reading the entries line by line ?
This is a function. Now this function will accept table Name and when u give that it's determine what the columns are and will accordingly make the dynamic insert . This is as dynamic as you can get... You aslo have to specify your directory where the data will be along with the file name. BUT BE SURE TO CHANGE UTL_FILE_DIR VALUE IN ur SP FILE AND BOUNCE THE DATABASE.