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 can i get remote.domainname.com point to a page on a URL eg:
www.domainname.com/TSweb.h
tml
Strictly Dreamweaver: Anyone with experience on RSS extension to Dreamweaver CS4 out there?
Active Directory Query
What is wrong with my sql query to find a LIKE match?
Windows Server 2008 Small Business Premium Install Issue
VB .Net 2008 Express Deploy Application
Can't logon "The local policy of this system does not permit you to logon interactively."
Alter Table Alter Constraint
Check installed applications
Physical wiring for hot stand-by