Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Problem in comparison of two way records in table
Hi All,
I have a problem with a table whereby everytime a record is created another is created showing the opposite of this:
e.g.
Rel_Id (PK)|Source_Id|To_Id|Start_Date|End Date R1 |P1 |P2 |2005-01-05|2005-02-05 R3 |P2 |P1 |2005-01-05|2005-02-05
The Rel_Id is a PK but is not nessarily created incrementally.
For some unknown reason in some instances only one of the rows have been created either the first or the second.
What I need is to create a SQL script which finds those rows where the corresponding opposite row has not been created.
I have tried, nested loops, joins everything I can think of, but maybe I am looking this the wrong way.
The oracle environment I am using is (I am at a client site): Oracle7 Server Release 7.3.3.0.0 - Production Release
Kind Regards,
Kal Received on Thu Jun 02 2005 - 08:59:28 CDT
![]() |
![]() |