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 create a count that starts at 001?
SQL Server Update Statement
Fujitsu Scan and Snap - Error Message
Bluetooth Not working on Lenovo Thinkpad T60p Widescreen
Connect Catalyst switch 2950 to a fiber optic line
Mofify the query
Get USERNAME when using windows authentication
float and precision
PDF embed
I want all computers on my LAN to be able to fileshare, currently only wireless users of each wireless router can fileshare