Re[2]: Duplicate value
Posted in 1998
Georg/Priti
Here is another way to find duplicate values using a 7.23 (I think?)
feature of the Informix SQL:
START VIOLATIONS TABLE FOR your_table_name;
SET INDEXES FOR your_table_name FILTERING;
LOAD FROM your_table_data.dat INSERT INTO your_table_name;
STOP VIOLATIONS TABLE FOR testv;
SELECT a.*, b.objtype, b.objowner, b.objname
FROM your_table_name_vio a, your_table_name_dia b
WHERE a.informix_tupleid = b.informix_tupleid;
What this does is setup a diagnostics and a violations table for your table,
and the FILTERING in the SET command pumps bad data to these two tables.
RTFM for the descriptions of the columns in the violations and diagnostics
table. The final SELECT outputs the bad data and the failure information
which you can then use to analyse the data. Once you know what the bad data
is you can then query the vio_ table to unload the bad data for reload or
other operations.
HTH
Sujit Pal
______________________________ Reply Separator
_________________________________
Subject: Re: Duplicate value
Author: "Georg Kowatsch" <georg.kowatsch@erstebank.at> at Internet
Date: 3/2/98 1:24 PM
- dbexport
- delete database
- dbimport
Priti Jhaveri schrieb in Nachricht <6d6qir$k3b$1@news.xmission.com>... >
>Hi All,
>We are using 7.11 UC2 on NCR 2.03.UNIX.Hi All, >
>When we try to do dbaccess-Table-Info-cOnstraints-Reference-referenceD for
one
>of our tables it displays error message.
>
>ISAM error: duplicate value for a record with unique key.>
>Considering the following scenario, How can I find the duplicate records ?
>
>Table tab1 Primary key pk1 and
>Tables tab2, tab3, tab4 tab5 ... tab10 foreign key fk1 references to pk1
>table1.
>
>Thank you very much for your help.
>
>Regards
>Priti
>