I'm working on a database where the date and time is in two seperate columns and I'm tasked to show records between two dates and times intervals.
I have made the following query, but that gives me only the records from 10 to 12 on both dates. I'm missing the records from after 12 to 10 the next day.
How can I accomplish this?
SELECT
[guid],
[date],
[time],
[pos]
FROM
SomeTable
WHERE
[guid] = '0Q8m48D_uHua6P0'
AND [date] >= '2017-09-12'
AND time >= '10:00'
AND [date] <= '2017-09-13'
AND time <= '12:00';