Home » RDBMS Server » Server Utilities » How to abort the load process
How to abort the load process [message #116501] Wed, 20 April 2005 07:38 Go to next message
peketi
Messages: 4
Registered: April 2005
Junior Member
I have a situation where I need to validate the file I am loading based on some data present in the text file. I should abort the load if the validation fails. How should I abort the loading process ?

I am using SQL Loader and have written a control file to load data from a text file into multiple tables.

Any help in this regard is highly appreciated.

Thanks in advance.
Peketi
Re: How to abort the load process [message #116569 is a reply to message #116501] Wed, 20 April 2005 11:54 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
You can use a 'when' clause.
'When' somecondition is met load the records.
else
Skip the records ( do no load the records. it wouldnt abort the sqlldr ).

http://www.orafaq.com/forum/t/42947/0/
Re: How to abort the load process [message #116635 is a reply to message #116569] Thu, 21 April 2005 01:30 Go to previous message
peketi
Messages: 4
Registered: April 2005
Junior Member
Thanks for the help. As I said I am loading it into multiple tables and the conditions on which the APPEND happens to these tables are totally different. Append to these tables should happen only if the validation is successful. It is explained like this, in a pseudo logic :

If Validation is successful
If POSITION(1:3) = 'AAA'
Load to table 'AAA'
If POSITION(1:3) = 'BBB'
Load to table 'AAA'
If POSITION(1:3) = 'CCC'
Load to table 'CCC'
If POSITION(1:3) = 'YYY'
Load to table 'YYY'
If POSITION(1:3) = 'ZZZ'
Load to table 'ZZZ'
Else
Abort loading
End If

Thanks for your effort again.

Thanks
Peketi
Previous Topic: Dynamically passing data file to SQL*LOADER
Next Topic: sql loader performance help!!
Goto Forum:
  


Current Time: Thu Jul 04 06:21:24 CDT 2024