Finding Ref Integrity Constraints
Posted in 1999
Topics: Triggers, Constraints & Referential Integrity
I'm trying to figure out what records in a table are causing a referencial constraint violation when I try to move some data. My problem is that I have a multipart foreign key so I need to find out what records in Table A don't exist in Table B where (A.1, A.2, A.3) = (B.1, B.2, B.3). I need to be able to do this with an SQL statement on an Informix 7.x database.
I have a script to show referential constraints for a table at http://www.tc.umn.edu/~hause011 the script is ref_load_ord -- --------------------------------------------------------- Steven Hauser email: hause011@tc.umn.edu URL: http://www.tc.umn.edu/~hause011 ---------------------------------------------------------
Why not just set the constraints to filtering, run the sql statement and then look in the violations table? Tom flashnet wrote: > I'm trying to figure out what records in a table are causing a referencial > constraint violation when I try to move some data. My problem is that I have > a multipart foreign key so I need to find out what records in Table A don't > exist in Table B where (A.1, A.2, A.3) = (B.1, B.2, B.3). I need to be able > to do this with an SQL statement on an Informix 7.x database.