Re: "Load from" SQL Statement ...
Posted in 1998
A very usefull command in this case is dbload. I do not know if you are
using transaction logging, but this shouldn't make much of a difference.
The dbload command tells you how many rows have been loaded into the table
(depending on the number of records you commit at a time) and you can also
skip x number of lines in a load file the second time you start the load -
which you will use when a load has crashed
dbload -d <database> -c <loadscript> -n 1000 -k -l <errorlog>
-n 1000 - commit every 1000 records to the database
-k - locks the table exclusively
If you look at the syntax, you will find another option to skip x number of
lines in the loadfile when you need to.
I hope this helps
Rick Nath <rnath@wrbc.com> wrote in article
<01bd7f85$70eb5210$2fdda8c0@bis005408>...
> 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.
>
> Rick Nath
>