Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Using upper-level alias in sub-query.
rashid_at_rk.wbs.com (Rashid Karimov) wrote:
> In something like:
>select s.name || '':'' || s.level || '':'' || i.ios_hours
>from services s, ios i, prices p
>where i.done_validation_id = null
> and p.id = i.price_id
> and s.id = p.service_id
> and s.name in (
> select role
> from employee_roles
> where employee_id = :x1
> and skills_level >= s.level )
>order by i.date_due
>
> will reference to s.level in the subquery work ? In other
>words in the subquery can I use references to the aliases defined
>in the upper query ? I'd prefer to stick to some monster SQl stmt
>( tables aren't too big to really affect the speed) vs resorting
>to coding it via PL/SQL
>
>E-mail copy of an answer , if any would be greatly appreciated.
>
>Rashid.
yes.
I guess you should write "i.done_validation_id is null" instead of "= null" which is always false...
pascal. Received on Sat Dec 07 1996 - 00:00:00 CST
![]() |
![]() |