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

Home -> Community -> Usenet -> c.d.o.misc -> Getting single (first) value from many side of a 1-to-many join??

Getting single (first) value from many side of a 1-to-many join??

From: Greg Schetinin <schetini_at_iinc.com>
Date: Tue, 30 Mar 1999 03:55:07 GMT
Message-ID: <37004918.25411998@news.iinc.com>


Help!!

I need a Select that will let me join 2 tables in a one to many relationship but I only want my result to contain a single 'record' with the first value from the many side.

ex.   	Table1	Table2
	id	id , value

data	1	1,a
		1,b
		1,c
	2	2,d
		2,e

Joining by id I'm getting:

	1,1,a
	1,1,b
	1,1,c
	2,2,d
	2,2,e

I want:
	1,1,a
	2,2,d

There are no values in Table2 to identify the correct record to use.

I've searched and can't find a solution. Any ideas?

Thanks in advance for any help! Received on Mon Mar 29 1999 - 21:55:07 CST

Original text of this message

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