Return last two max values

Last Post 08 Nov 2004 01:16 PM by maggi. 0 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
maggi
New Member
New Member

--
08 Nov 2004 01:16 PM
I have an empolyee payment table by employee number, payment_date, period_end_date and payment. Some time for some employees by each payment_date, there are two or three or four period_end_date. I need write a query to only return last two (period_end_date)s for each payment_date for all employees, no matter how many period_end_date they have on by each payment_date. Can you provide some samples to write this query?

Platform: SQL2k sp3, win 2k sp
Thanks.
You are not authorized to post a reply.

Acceptable Use Policy