unique constraint violation
Posted in 2005
Topics: Triggers, Constraints & Referential Integrity
--0-2140643701-1123966184=:72718 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit I have a table with a two-columns unique constraint and no more constraints. When i try to delete all thw rows in this table, i get an Unique constraint violation, why?. Informix SE 7.2 __________________________________________________ Correo Yahoo! Espacio para todos tus mensajes, antivirus y antispam 'gratis! Reg'strate ya - http://correo.espanol.yahoo.com/ --0-2140643701-1123966184=:72718 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit <DIV>I have a table with a two-columns unique constraint and no more constraints.</DIV> <DIV> </DIV> <DIV>When i try to delete all thw rows in this table, i get an Unique constraint violation, why?.</DIV> <DIV> </DIV> <DIV>Informix SE 7.2</DIV> <DIV> </DIV> <DIV> </DIV><p>__________________________________________________<br>Correo Yahoo!<br>Espacio para todos tus mensajes, antivirus y antispam 'gratis! <br>Reg'strate ya - http://correo.espanol.yahoo.com/ --0-2140643701-1123966184=:72718-- sending to informix-list
Luis Carlos D'az Otero wrote: > I have a table with a two-columns unique constraint and no more constraints. > > When i try to delete all thw rows in this table, i get an Unique constraint violation, why?. > > Informix SE 7.2 What's the rest of the version? 7.20 and 7.25 are separated by quite a long time. Which platform? What exactly is the SQL error number and message? Is there an ISAM error number too? Which program are you using to effect the delete? (DB-Access, something else?) What is the schema of the table? -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2005.02 -- http://dbi.perl.org/
Are you sure you don;t have a foreign key contraint on this table from another table? Eg this table contains part numbers and the other table says it can;t have partnumbers in it that don;t exist in this table? Then if you try and delete from this table there can be a violation. Luis Carlos Díaz Otero wrote: > --0-2140643701-1123966184=:72718 > Content-Type: text/plain; charset=iso-8859-1 > Content-Transfer-Encoding: 8bit > > I have a table with a two-columns unique constraint and no more constraints. > > When i try to delete all thw rows in this table, i get an Unique constraint violation, why?. > > Informix SE 7.2 > > > > __________________________________________________ > Correo Yahoo! > Espacio para todos tus mensajes, antivirus y antispam ¡gratis! > Regístrate ya - http://correo.espanol.yahoo.com/ > --0-2140643701-1123966184=:72718 > Content-Type: text/html; charset=iso-8859-1 > Content-Transfer-Encoding: 8bit > > <DIV>I have a table with a two-columns unique constraint and no more constraints.</DIV> > <DIV> </DIV> > <DIV>When i try to delete all thw rows in this table, i get an Unique constraint violation, why?.</DIV> > <DIV> </DIV> > <DIV>Informix SE 7.2</DIV> > <DIV> </DIV> > <DIV> </DIV><p>__________________________________________________<br>Correo Yahoo!<br>Espacio para todos tus mensajes, antivirus y antispam ¡gratis! <br>Regístrate ya - http://correo.espanol.yahoo.com/ > --0-2140643701-1123966184=:72718-- > sending to informix-list