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
Enter Windows XP to Standby programmatically
Factory Default setting on a Catalyst 1900 cisco switch
Monitor For Only Specific Words
flash object doesnt show in IE
Weird Javascript behvior using alerts
System functions in SQL
servername
When I open Outlook I get a certification error, I have a godaddy SSL certificate and the problem has happened since installing that I assume it a internal error as external (OWA) is fine no errors
simple .htaccess php rewrite rule not working
How do I get Web content to fit the window on the Android?