Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> sql help

sql help

From: Brian <bkissler_at_lebensart-tech.com>
Date: 7 May 2002 10:41:18 -0700
Message-ID: <1a4a203b.0205070941.452b5929@posting.google.com>


Hello all,

I'm having difficulties completing this query. I have a table with a primary key of ID1 and a foriegn key of ID2. What I want my qeury to do is return one primary key (ID1) for each foreign key. Example: From the table below -

ID1 ID2
---------- ----------

4198       5511601
31380      5511601

1454716 5511601
1455577 5511601
1455637 5511601
1456244 5511601
1489157 5511601
1503752 5511601
15068      23544883
42821      23544883

1390131 23544883

ID1 ID2
---------- ----------

1418794 23544883

Query with a result of -

ID1 ID2
---------- ----------

4198        5511601
15068       23544883

I've tried using group by and can't figure out what I need to do. Any help would be great!!

TIA Brian Received on Tue May 07 2002 - 12:41:18 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US