Jump to content

Recommended Posts

Here it goes... What I am trying to do is in our time tracking database I want to be able to print out a report that shows the missing time cards for the day.  I am not certain how to get there it sounds earier than its been.  Here is what I have been trying unscucessfully at.  Below is a NOT EXIST sub query, which I am sure probably is not correct.  What I need to do is query the Employee database against the timesheet table for the current date and output employees from the employee database which have no records for the day in the time database.

 

SELECT EMPLOYEE_NO FROM employee
  WHERE NOT EXISTS (SELECT DISTINCT EMPLOYEE_NO FROM time
WHERE time.EMPLOYEE_NO = employee.EMPLOYEE_NO AND time.date='2007-05-24')

 

Anyone who can offer suggestions or a fix I would be appreciated.

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/55633-help-mysql-not-exist-trouble/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.