On Fri, Feb 27, 2009 at 1:22 PM, wrote:
> When I am trying to insert a row into a table I am getting the
> following error. Is there any way to log this failed row (row values)
> because of unique index violation.
>
> insert into t1
> select * from t2 where col2 = 2 ;
>
> 239: Could not insert new row - duplicate value in a UNIQUE INDEX
> column (Unique Index:idx1).
> 100: ISAM error: duplicate value for a record with unique key.
Consider whether START VIOLATIONS TABLE provides what you need (SQL
Syntax Manual).
If you are trying to debug an immediate problem, then this will
probably get you the answer.
If you are trying to do this long term, I'd probably think twice -- it
will still work, of course, but you really shouldn't need it except in
extraordinary situations.
--
Jonathan Leffler #include <disclaimer.h>
Email: jleffler.TakeThisOut@earthlink.net, jleffler.TakeThisOut@us.ibm.com
Guardian of DBD::Informix v2008.0513 --
http://dbi.perl.org/
"Blessed are we who can laugh at ourselves, for we shall never cease
to be amused."
NB: Please do not use this email for correspondence.
I don't necessarily read it every week, even.
>> Stay informed about: Is there any way to log failed insert row because of uniqu..