Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to filter IN and OUT punch timings for Attendance in Day and Night shifts in oracle SP?

ChakravarthyDBAJul 4 2013 — edited Jul 5 2013

I am developing Attendance system which having day and night shift I am unable to filter the IN and OUT punches of the employees? below is my current logic

shift timings on 29-Jun-2013 IN 22:00 OUT 07:00 and on 30-Jun-2013 IN 15:00 OUT 22:30

I am filtering the IN and OUT punches based on shift timings and swipe time along with date, but when the employee changing from night shift to day shift I am getting problem.

the below is the one scenario

the employee : 101 has worked on 29-Jun-2013 on night shift punched at 22:00 and he left at next day means 30-Jun-2013 07:00 AM and again the same day (30-Jun-2013) he came to office at 15:00 on 30-Jun-2013 and he left at 22:30 on the same day now if the punches will come daily then there is no problem, however due to any problem punches are not received for 30-Jun-2013 07:00 AM then the punches IN 15:00 OUT 22:30 on 30-jun-2013 already in database now the out punch of 29-Jun-2013 is 30-Jun-2013 at 07:00 AM it is difficult to find this as previous day out punch

Note: some times the employees forgot to swipe IN/OUT punch

so if any body have solution please update

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 2 2013
Added on Jul 4 2013
5 comments
2,169 views