Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Query
Hello all. I've got a question about a query I need written.
The set up...
Table A: has several columns, but the most important of which are Person_ID (a unique identifier that is the key to Table A) and Employee_ID (a non-unique, at least to this table, number).
Table B is a Child to Parent Table A. The key to Table B is merely a sequential number, but the foreign key to the table is Employee_ID. A field on Table B is ID_Number. It is non-unique.
What I need to do is spin through Table B, finding ALL values of ID_Number that are ALIKE. Then, for those like ID_Numbers, I need to take the corresponding Employee_IDs and read Table A for each. Finally, I need to compare the corresponding Person_IDs for each of those Employee_IDs and, if they are DIFFERENT, display them as a pair (or group).
The goal, then, is to list all the Person_IDs from Table A that share the same ID_Number from Table B.
Note that Table A and B each contain about 100,000 rows of data.
Can anyone help me?
Thanks,
ice Received on Fri Nov 10 2000 - 22:47:40 CST
![]() |
![]() |