Re: LOAD (ignoring errors)
Posted in 1997
David Williams wrote:
>
> In article <340DA96B.52A1@sysdeco.dk>, Claus Samuelsen <csa@sysdeco.dk>
> writes
> >
> >aheller@visa.com wrote:
> >>
> >> 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
> >>
> >> Thanks in advance
> >>
> >> -------------------==== Posted via Deja News ====-----------------------
> >> http://www.dejanews.com/ Search, Read, Post to Usenet
> >
> >If your database server is version 7.10.UD1 or later you can use
> >START VIOLATIONS TABLE FOR mytable;
> >SET INDEXES, CONSTRANTS FOR mytable FILTERING WITHOUT ERROR;
> >LOAD FROM "load_file" INSERT INTO mytable;> >STOP VIOLATIONS TABLE FOR mytable;
> >
> >The START VIOLATIONS will create two tables mytable_vio and mytable_dia.
> >What happens is that when a unique index or a constraint for the table
> >would be violated, the row with the error will go into the table called
> >mytable_vio instead of mytable, and a row with explanation will be
> >stored in the table called mytable_dia.
> >
> >If you are not interested the errors, then just
> >DROP TABLE mytable_vio;
> >DROP TABLE mytable_dia;> >
>
> Which manual is this in? I have heard of the feature but not seen
> and details (E.g.syntax/ tablenames) mentioned anywhere.
>
> --
> David Williams
Guide to 7.1 Feature Enhancements. Part no 000-7748
--
Peter Lancashire
Mail: Peter.Lancashire.PL1@bayer.co.uk
Information Systems Specialist, Bayer plc
Eastern Way, Bury St Edmunds, Suffolk, IP32 7AH, UK
Tel: +44-1635-562258, Fax: +44-1635-562281
All opinions are my own and not those of Bayer plc.