How we can find the nth higest number in MSSQL?
Printable View
How we can find the nth higest number in MSSQL?
What do you mean by [B]nth higest number [/B]. Are you trying to find out nth heighest value from a table . Like 10th heighest salary or 5th elder person. Please specify your requirment clearly.
To fine the N-th highest number you can use the subquery and substitute <N> with the desired number:
SELECT MIN(ColumnName) FROM TableName WHERE ColumnName IN (SELECT TOP <N> ColumnName FROM TableName ORDER BY ColumnName DESC)
select max(coloumn-name) from Table-name
try out this it will give the n-th highest number
select * from emp e1 where n=(select count(Distinct e2.sal) from emp e2 where e1.sal<=e2.sal);
in "n" place u can give any no 0k.... it is working...
ALL THE BEST
Hi, can any one tell me is it possible to install informatica tool in linux operating systems.