Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: sql question
Try:
select pert.user_id,font.phone_no
from persontest pert, phonetest font
where pert.user_id = font.user_id(+) and
font.ptype_id(+) = 1 |
If I remember, when you use this kind of join, you have to add the plus sign after each column name of the same table.
Hope it helps. Regards.
Denis.
|I have a sql question. I think there may be a way to do this in one
|straight join instead of creating a 'cleaner' table. Any ideas? TIA.
|
| [...]
|
|I need to retrieve previous query, BUT only where ptype_id= 1.
|If I do that now, I get
|
|USER_ID PHONE_NO
|---------- ----------
|1 2015551212
|2 7185551212
|
|2 rows retrieved
|
|and the user_id 3 is lost because there is no one-to-one set
|correlation.
Received on Wed Apr 22 1998 - 16:02:04 CDT