Page 1 of 1

How to get the 'N' th max value from the series of records

Posted: Tue Sep 02, 2008 3:39 am
by siva7143
Hi,

Suppose you have 100 records with different salary values from source.

I need to get the Nth max value from 100 records.

Example:

I need to load only the 5th maximum salary value alone into the target table.

How can we achieve this?

Thanks in Advance,
Siva Kumar N :)

Posted: Tue Sep 02, 2008 4:13 am
by ray.wurlod
Execute in sequential mode (or use a server job). Sort in descending order. Count the rows. Pass only the fifth row.