Microsoft
Software
Hardware
Network
Question : Grab last two lab results
I need to grab the last two lab results from a table by date. How do I do this? I can grab max but not sure how to grab the last two. If there are 10 results I just want the last two
Answer : Grab last two lab results
select * from
(
select *,
rn=row_number() over (partition by patientid order by date desc) -- rank for each patient by latest date
from tbl
) SQ
where rn<=2 --- only top 2
Random Solutions
want to merge win7 partition into winxp partition so only win 7 remains
How do I setup "completely" Unsolicited Remote Assistance Requests in Windows 7 for remote support? - Replacing free VNC
How do i force notepad as the html editor across my network using group policy?
Unable to open a folder placed on desktop - restriction issues
java.lang.OutOfMemoryError
- CFQUERY
List of users in a Active Directory Distribution list
ASA - Startup and Running Config discrepency
How to edit pdf in Adobe Pro 9
Are Windows Notepad files stored anywhere temporarily?
find files in command line