I have data in text format and I want to load it into my Oracle database with SQL*Loader. However, I have no idea...
how to go about it. Could you please send me detailed steps? My RDBMS version is 8.1.6 and OS is Compaq Tru64. You'll need to use Oracle's SQL*Loader utility to load a text file into a database table. There are many options to SQL*Loader, so a read of the Oracle Utilities Guide is probably a good idea.
How you load the data depends on whether the data is comma delimited, tab delimited, uses special characters, needs additional processing and so on. Once you know these answers, you need to create a control file which describes how to handle all of your options. An example control file to load some data might look like the following:
LOAD DATA INFILE 'ITS_data.txt' BADFILE 'ITS_data.bad' DISCARDFILE 'ITS_data.dsc' APPEND INTO TABLE pims_temp FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' (wbs_parent,wbs,ffs_account,ffs_account_desc,ffs_subtask_desc, rescode,resource_name,resdept,type, hrs_dlrs_ind,month1,month2,month3,month4,month5,month6,month7,month8,month9, month10,month11,month12)
In this case, the input file is called 'ITS_data.csv'. It will load this data into a table called 'pims_temp'. The input file is a comma delimited file, optionally enclosed with the double quotes.
Without knowing more about your specific requirements, I can't help much more than that. You'll really want to read the chapter on SQL*Loader in the Oracle Utilities Guide.
Dig Deeper on Oracle database design and architecture
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.