SQL Language (MOSC)

MOSC Banner

validate shift

edited Jul 30, 2018 9:05AM in SQL Language (MOSC) 4 commentsAnswered ✓

if i have a shift from 23:00  to 08:00

if i want to validate 30/7/2018 23:18:00 on this shift by this code

select count(*)

      from mo_shifts ms

     where to_char('30/7/2018 23:18:00', 'hh24:mi') between ms.on_duty_time and

           ms.off_duty_time

this code is wrong because :

       between 23:00 and 8.00

      

because 23 greater than 8

what is the correct code ?

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center