Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Rows/no rows
"Ed Prochak" <edprochak_at_gmail.com> schreef in bericht
news:1187902480.507818.116690_at_q3g2000prf.googlegroups.com...
> On Aug 23, 3:30 pm, "astalavista" <nob..._at_nowhere.com> wrote:
>> Hi,
>>
>> Something weird happened, the first query retruns rows but not the second
>> Have you an explanation ? ( 9.2.0.6 AIX)
>>
>> Thanks in advance
>>
>> select * from
>> V_PROD_INT S_PROD_INT,
>> S_PROD_INT PR_EQUIV,
>> S_ORG_EXT
>> WHERE
>> S_PROD_INT.PR_EQUIV_PROD_ID = PR_EQUIV.ROW_ID(+) AND
>> S_PROD_INT.VENDR_OU_ID = S_ORG_EXT.ROW_ID(+)
>>
>> select S_PROD_INT.row_id from
>> V_PROD_INT S_PROD_INT,
>> S_PROD_INT PR_EQUIV,
>> S_ORG_EXT
>> WHERE
>> S_PROD_INT.PR_EQUIV_PROD_ID = PR_EQUIV.ROW_ID(+) AND
>> S_PROD_INT.VENDR_OU_ID = S_ORG_EXT.ROW_ID(+)
>
> That seems puzzling. have you tried this? What happens?
>
>
> select S_PROD_INT.<primary key>
> from
> V_PROD_INT S_PROD_INT,
> S_PROD_INT PR_EQUIV,
> S_ORG_EXT
> WHERE
> S_PROD_INT.PR_EQUIV_PROD_ID = PR_EQUIV.ROW_ID(+) AND
> S_PROD_INT.VENDR_OU_ID = S_ORG_EXT.ROW_ID(+)
>
> ed
>
It is not so puzzling, this query is just asking for problems. Take a view
(I suppose) , alias it with a table name, use the same table in your query
under a different alias and then try to understand what is happening. Use
different aliasses and see what your query does then. I suppose YOU know
which of the S_PROD_INT 's was meant in the where clause, I don't.... but I
guess it should have been V_PROD_INT.
And if I interpret your rowid query right, you look for a rowid in a
view.....
Shakespeare Received on Fri Aug 24 2007 - 04:09:36 CDT
![]() |
![]() |