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 -> SubSelect?

SubSelect?

From: Darel Finkbeiner <darel.finkbeiner_at_gmail.com>
Date: 16 Feb 2007 03:29:34 -0800
Message-ID: <1171625374.563436.193350@a75g2000cwd.googlegroups.com>


Disclaimer - I've never used sub selects. I'm not even that familiar with Oracle.

I have this situation:

Table A
primary_id
data1
data2
score_number

Table B
start_number
end_number
threshold_number

I want to select everything from table A and the threshold_number from table B where the primary_id is between start_number and end_number.

I can't seem to wrap my head around how to do this. Conceptually I'm thinking like this:

select A.primary_id, A.data1, A.data2, A.score_number, (select B.threshold_number from B where A.primary_id between B.start_number and B.end_number) from A

Any help or pointers would be appreciated. Received on Fri Feb 16 2007 - 05:29:34 CST

Original text of this message

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