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: Is this SQL Possible??

Re: Is this SQL Possible??

From: Michael McMullen <ganstadba_at_hotmail.com>
Date: Mon, 20 Dec 2004 14:52:35 -0500
Message-ID: <BAY20-DAV437B2F0A2475783C3395DA6A20@phx.gbl>


use an analytical

select
c.name.c.assignment
from
(
select
a.name,b.assignment,row_number() over (partition by a.name order by b.assignment) rnum
from
employee a, gd b
where a.name = b.name
) c
where rnum = 1

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Dec 20 2004 - 13:50:49 CST

Original text of this message

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