March 8, 2023 at 7:49 am
Hi,
I would like to retrieve only the rows after 23:59:59 but I am getting the output as shown in the picture.
Please advise how to write a correct where clause
SELECT ID, STARTDATE, STARTTIME, ENDTIME
FROM MACHINELOG
WHERE (STARTTIME > CAST('00:00:00' as time(0)) AND ENDTIME < CAST('09:00:00' as time))
ORDER BY ID DESC
March 8, 2023 at 10:09 am
double post !
https://www.sqlservercentral.com/forums/topic/select-rows-on-time-criteria
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply