Link to home
Start Free TrialLog in
Avatar of morinia
moriniaFlag for United States of America

asked on

Select within a select in Oracle

Experts,

I  have seen the code before where partition by is used in an Oracle Query to get row_num and there is another query concatanated to it to get other columns within the table where row_num = 1. Can someone give me the syntax for this?  I  believe it looks something like this:

Select row_number() over (partition by member_id ORDER BY date_entered DESC) rownum FROM
 Select   member_id
           , claim
          , date_entered
FROM TABLEA
where rownum = 1;
quit;
Avatar of MikeOM_DBA
MikeOM_DBA
Flag of United States of America image

The query you posted makes no sense, try posting your requirements clearly.

Otherwise check: Oracle® Database SQL Language Reference
11g Release 2 (11.2) Analytical Functions
:p
ASKER CERTIFIED SOLUTION
Avatar of johnsone
johnsone
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial