Experts Exchange connects you with the people and services you need so you can get back to work.
SELECT TOP 1 FullName, DateCreated, NumVal from tbl WHERE NumVal = 1000 ORDER BY DateCreated DESC
Open in new window
select FullName, MAX(DateCreated) as DateCreated, NumVal
where NumVal = 1000
Group By FullName, NumVal
, ROW_NUMBER() OVER (ORDER BY DateCreated DESC) AS rn
FROM yourtable) d
WHERE numval = 1000
WHERE rn = 1
Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
;with latest as
( select row_number() over (partition by numval order by datecreated desc) as rn,
FullName, DateCreated, NumVal
where numval = 1000
) select FullName, DateCreated, NumVal
where rn = 1
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.