i want to do the following in SQL :
I have three shifts:
Shift 1 : 07:00 - 14:59
Shift 2: 15:00 - 22:59
Shift 3: 23:00 - 06:59
I want to know which shift i am actually in, depending on my sysdate (time). The following statement doesn't work for "02:00". start_time and end_time are varchar2
SELECT * FROM abc
WHERE to_char(sysdate, 'HH24:MI')
between start_time and end_time;
How can i do that?