Re: LOAD (ignoring errors)
Posted in 1997
>From: aheller@visa.com >Date: Tue, 02 Sep 1997 13:52:35 -0600 >X-Informix-List-Id: <news.42393> > >What I'd really like to do is run the LOAD command within DB-ACCESS and >have LOAD ignore any errors it gets along the way (instead of blowing >up). Does anyone know if this is possible (if so, the syntax) or do I >have to use DBLOAD There is no way of getting either DB-Access or ISQL to ignore errors during loading. Therefore, you are stuck with DBLOAD -- or with going to other loading software. Check the IIUG web site (http://www.iiug.org) for the SQLCMD program; it has options enough to keep you happy without making you resort to using DBLOAD. Of course, I'm biassed in this estimation -- I wrote it. I also just about had enough sense to check what it does with erroneous loads, and it stops. I'm not keen on trying to load erroneous data into the database; why isn't your data clean? It probably would not take an incredible amount of work to fix the code so that it continued after an error during a load operation (it would be a question of modifying the test after EXEC SQL PUT c_insert in reload.ec so that it uses ctxt_getcontinue() to see whether it should continue after an error, but you'd also have to worry about how many rows got flushed but not inserted when the PUT fails, which is probably done most easily by executing the prepared INSERT statement instead of using an INSERT cursor). Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h> PS: Warning I do not reply to messages with anti-spam in the return path.