Re: "Load from" SQL Statement ...
Posted in 1998
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
Rick Nath wrote:
> I was wondering if anyone has stumbled upon a way in which to continue
> processing a 'load' file even after it has encountered an error (such as
> duplicate key) within the file? We have process written that takes a
> delimited file and attempts to load. If there are no errors everything is
> fine. However if there is an error such as a duplicate key, the loading of
> the entire file stops and we are forced to go through the entire file to
> find the bad record, remove it, and restart the process. Other options
> such as SPs and 4GL are welcome.
I prefer to use Perl to handle situations like this rather than SPs or
4GL. Many of my loads are pre-processed by a Perl script which rifles
through the data looking for known sources of trouble. You can either
find duplicate keys and such in the Perl script or have Perl execute
dbload and capture/handle any errors.
You can also set the number of errors dbload will allow...
$.02
j
--
Jay Hannah
Quality Service Management, Inc.
[v:] 402/397-7077 x29 [f:] 402/397-7576 [p:] 402/899-1793