Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> SubSelect?
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