I have a SQL column like this:
| id | name | date | hour |
I want to select all names between specified start_date
, start_hour
and end_date
, end_hour
.
For data like this:
| 1 | one | 2014-12-29 | 11:00 |
| 2 | two | 2014-12-30 | 09:00 |
| 3 | three | 2014-12-30 | 11:00 |
Values:
start_date = 2014-12-29
start_hour = 11:00
end_date = 2014-12-30
end_hour = 10:00`
It should return: one, two
.