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
how to exclude double
Delphi Programing - Naming windows automatically in the menu
SetPrivilege for a dll
Where do I find an interactive mapping software that can place pushpin locations on a map, with a logo in the balloon
After installing desktop experience on 2008 RDP server outlook is no longer default mail program HELP!
Fastest way to count how much , I have in string variable with C#
Exchange 2007 split DNS concern
iMovie > iDVD; de-interlace video.
T1 bandwidth + throughput
Moving large amounts of data