Loading Table Informix 5
Posted in 2000
Topics: General Discussion
I want to load a table from a text file using the load command. The table has unique key constraints on it and some of the records I'm attempting to load cause it to fail. Is it possible to have the load command keep loading after it has problem with a record and output to a file all of the records that failed to load? Thanks in advance.
Hi!
Try dbload instead. It will allow you to continue, if you specify max
number
of errors allowed. It is a utility program, I think it was documented with
SQL.
HTH
Michael
Jon Borys wrote:
> I want to load a table from a text file using the load command. The
> table has unique key constraints on it and some of the records I'm
> attempting to load cause it to fail. Is it possible to have the load
> command keep loading after it has problem with a record and output to a
> file all of the records that failed to load? Thanks in advance.
Hello,
Assuming that the columns in your text data match your table
columns one by one and are separated by delimiter |; here's what
you should do:
Edit a command file having these two lines in it (where n is the
number of columns)
FILE "unloadfile" DELIMITER "|" n;
INSERT INTO yourtable;
then at the informix command prompt type:
dbload -d yourdatabase -c "commandfile" -l "logfile" -e bignumber
bignumber should be larger than the number of errors you expect.
After this command executes you can check the contents of the
file you specified at the -l switch for rows which failed.
Hope this helps
Alp
In article <38D94D3A.D2BF4BE0@rms.moore.com>, Jon Borys
<jborys@rms.moore.com> wrote:
>I want to load a table from a text file using the load
command. The
>table has unique key constraints on it and some of the records
I'm
>attempting to load cause it to fail. Is it possible to have the
load
>command keep loading after it has problem with a record and
output to a
>file all of the records that failed to load? Thanks in
advance.
>
>
>
* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!
yes, it is called High Performance Loader HPL, or ipload & Nona >Subject: Loading Table Informix 5 >From: Jon Borys jborys@rms.moore.com >Date: 22.03.00 23:46 W. Europe Standard Time >Message-id: <38D94D3A.D2BF4BE0@rms.moore.com> > >I want to load a table from a text file using the load command. The >table has unique key constraints on it and some of the records I'm >attempting to load cause it to fail. Is it possible to have the load >command keep loading after it has problem with a record and output to a >file all of the records that failed to load? Thanks in advance. > > > > > > >