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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Help about Table selection, please

Re: Help about Table selection, please

From: DA Morgan <damorgan_at_psoug.org>
Date: Thu, 09 Aug 2007 08:19:47 -0700
Message-ID: <1186672788.244667@bubbleator.drizzle.com>


wajim wrote:
> Hi all, I have here a query to sort name, job function and department,
> the query is working but I don't know how to restrict the selection, I
> mean instead of sorting
> all departments and functions, I onli need to sort employees who are
> managers in the 'SALES'
> an 'RESEARCH' departments.
>
> Here is my query...
>
> select e.first_name||' '||e.last_name "full_name",
> j.function "job_function", d.name "department"
> from employee e, job j, department d
> where e.department_id=d.department_id
> and e.job_id=j.job_id;
>
>
> Thanks in advance

UNION ALL a sorting query to a non-sorting query.

And in the end you will likely gain nothing measurable: Sort it all unless an explain plan demonstrates otherwise.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Thu Aug 09 2007 - 10:19:47 CDT

Original text of this message

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