Sample Header Ad - 728x90

Modification of the sql loader control file

1 vote
0 answers
420 views
I am working on a script which uses Oracle SQL *Loader to load data into a table. However, anywhere I search about the control file of an sql loader I am seeing only statements like: "load data into table TABLE_NAME TRUNCATE FIELDS TERMINATED BY ';' TRAILING NULLCOLS ( Field1, Field2, Field3, Field4) ' Can I insert select statement in this control file ? I suppose want to verify if field3 in the incoming record has a certain value for which a record can be found in an existing table containing a similar field and if yes then it load the data and if no then it would send an output to a log file. For example, for the incoming record, say p, I want to verify if the count of records for (select * from table_k where field_demo = p.filed1) is greater than zero or not. If it is greater than zero then it would insert the record into the table otherwise show an output message to the log file.
Asked by private ryan (11 rep)
Jul 17, 2016, 08:08 PM
Last activity: Oct 21, 2016, 05:31 AM