Path: dp-news.maxwell.syr.edu!spool.maxwell.syr.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.media.kyoto-u.ac.jp!newsfeed.gamma.ru!Gamma.RU!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: "Homer Frey" <homerfrey@gmail.com>
Newsgroups: comp.databases.oracle.misc
Subject: SQL*Loader exit status
Date: Fri, 3 Mar 2006 23:24:49 +0100
Lines: 49
Message-ID: <46ru1jFcbqsqU1@individual.net>
X-Trace: individual.net JaXoK4LTnE7i0EEtT8hgxgYX7cicu68LH9UIizeAr24vF2mE2T
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: dp-news.maxwell.syr.edu comp.databases.oracle.misc:125688

 Hello,

I have a Java class which calls the Oracle SQL*Loader to import data into a 
database-table (Oracle 9i).

To check if everything worked fine I analyse the exit status of the 
SQL*Loader.

My tests showed me the following exit status:

0: All data was successfully imported
1: Problems with connection to database or for instance table is already 
full
2: Bad data, e.g. some data could not been imported

But now I found out something peculiar which makes me some problems.

This is my control file:

INSERT
INTO TABLE ms.TEST

WHEN(01:03) != 'End'

FIELDS TERMINATED BY ','

(NR
,
NAME
,
AMOUNT
,
PRICE
)


As you can see I use a WHEN-condition to get the last row. And this makes me 
trouble.

Because due to this condition I get an exit status of "2". But it works like 
I want: Import all data except the last line. So I expect a exit status of 
0. So why SQL*Loader throws exit status 2???

Can I tell this SQL*Loader anyhow to give me a 0 when it not import all data 
due to the WHEN-condition? Have I to change the ctrl-file?

Regards Homer 


