Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Using upper-level alias in sub-query.

Using upper-level alias in sub-query.

From: Rashid Karimov <rashid_at_rk.wbs.com>
Date: 1996/12/06
Message-ID: <589qgp$mh4@nnrp1.farm.idt.net>#1/1

        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.

--
                             ------------------

               Beyond the horizon of the place we lived when we were young
               In the world of magnets and miracles
               Our thoughts strayed constantly and without boundary
               The ringing of the division bell had begun ...
                        -=PF, The Division Bell=-
Received on Fri Dec 06 1996 - 00:00:00 CST

Original text of this message

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