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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Query issue

Re: Query issue

From: Manjula Krishnan <oradba.la_at_gmail.com>
Date: Mon, 5 Feb 2007 17:42:56 -0600
Message-ID: <9c92486f0702051542r55b119c8mc5e065f4c58097a6@mail.gmail.com>


Please ignore this. I got it.

Thanks.

On 2/5/07, Manjula Krishnan <oradba.la_at_gmail.com> wrote:
>
> This query is driving me crazy. I know I am missing something simple here:
>
> select e.employee, mrev.next_review
> from employee e
> ,(select r.employee, max(r.next_review) as next_review
> from review r
> group by r.employee) mrev
> where e.emp_status not in ('T', 'X', 'XX')
> and e.employee = mrev.employee(+)
>
> Employees have multiple rows in the review table and not all employees are
> in the review table. I need to get the latest next_review, which I am
> getting from the query.
>
> But, how do I get the corresponding next_rev_code for this employee which
> is also in the review table?
>
> Thanks,
>
> Manjula
>

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Feb 05 2007 - 17:42:56 CST

Original text of this message

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