Home » Developer & Programmer » Forms » Absent Employee Report Query (Oracle Developer Suite 10g)
icon5.gif  Absent Employee Report Query [message #569020] Thu, 18 October 2012 13:34 Go to next message
arain.jobs@gmail.com
Messages: 4
Registered: October 2012
Location: Pakistan
Junior Member
Hi Experts!

I have a requirement that I need to create a report for absent employee, kindly note that we have "Hand Punch" scaning system for attendance, when a employee scan his hand it put a record with the employee id, date, shift, & time.

Now I need to create a report for absent employees in date range, can any body hint/help me to create this report.


Sad

[Updated on: Fri, 19 October 2012 08:14]

Report message to a moderator

Re: Absent Employee Report Query [message #569115 is a reply to message #569020] Sat, 20 October 2012 14:41 Go to previous messageGo to next message
Littlefoot
Messages: 19905
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
One option would be to use the MINUS set operator: <all employees> minus <present employees>.
select e.emp_id
from employees e
minus
select h.emp_id
from hand_punch h
where h.date_column between to_date('20.10.2012 07:00', 'dd.mm.yyyy')
                        and to_date('20.10.2012 07:30', 'dd.mm.yyyy')
Re: Absent Employee Report Query [message #570137 is a reply to message #569115] Mon, 05 November 2012 21:22 Go to previous message
xpact83
Messages: 218
Registered: October 2008
Location: philippines
Senior Member
select e.emp_id
  from employees e
 where not exists (select 1 
                     from hand_punch h
                         where h.emp_id = e.emp_id 
                           and h.date_column between to_date('20.10.2012 07:00', 'dd.mm.yyyy')
                                                 and to_date('20.10.2012 07:30', 'dd.mm.yyyy')
                           )

Previous Topic: calculate sum in a form
Next Topic: show manager with employee
Goto Forum:
  


Current Time: Mon Dec 29 10:46:58 CST 2014

Total time taken to generate the page: 0.09115 seconds