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
need Asus Motherboard M2NPV-VM Lan Ethernet Driver - still have old hard drive
Raise domain function level when there are 2 ADs
Powershell - Help with existing script/csv combo
PHP GD add colour overlay to image
Filesharing Windows 7 files for XP Machine
Actionscript 2.0 combo box
How can I disable flash allowfullscreen?
How to make changes to a cisco switch configuration file
Using install script to get directory path of the installation
adding user to an existing AD group