Codings

Please support our MS SQL advertiser: Intel Parallel Studio Home
Reply

Join Date: May 2008
Posts: 17
Reputation: Jahira is an unknown quantity at this point 
Solved Threads: 0
Jahira Jahira is offline Offline
Newbie Poster

Codings

 
0
  #1
Oct 7th, 2008
Hello Sir,

Can i plz have query of "Find the 6th highest salary from the table" .....plz send me d query
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 42
Reputation: huangzhi is an unknown quantity at this point 
Solved Threads: 13
huangzhi huangzhi is offline Offline
Light Poster

Re: Codings

 
0
  #2
Oct 11th, 2008
Try this code below:
  1. SELECT top 1 *
  2. FROM (SELECT top 6 *
  3. FROM #tmpSalary
  4. ORDER BY Salary) X
  5. ORDER BY Salary DESC
Hence Wijaya
www.ex-Soft.tk
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC