A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Query



 
 
Thread Tools Display Modes
  #1  
Old November 29th, 2006, 08:31 PM posted to microsoft.public.access.queries
Jerry Whittle
external usenet poster
 
Posts: 4,732
Default Query

SELECT EL.*
FROM EL
WHERE EL.PrimaryKeyField NOT IN
(SELECT O.ForeignKeyField
FROM O
WHERE DateField = WhatEverYouAreUsingForMonth) ;

One problem with the above is that it will return all employees including
those who have quit if still in the EL table. You might need to add to the
first WHERE clause something to remove former employees.
--
Jerry Whittle
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"ChrisM" wrote:

Query MESS... Please Rescue

Query - Perfect Attendance
Tables - Employee List; Perfect Attendance;Occurances

Perfect Attendance is based on no occurances within specified month (ie
November)

What I need is a query that will run - All Employees (EL), when Occurances
(O) equal a null value and/or not included in the Occuance Table

Explain - only time the Occurance Table is populated is when you are absent;
if you are not absent well you dont get entered into this Table... sooo
There are some employees not included in the Table because they have been
good little boys and girls.

What I have now is my query set up to run based on current month/year and
thats about it

Any help is appreciated
Christy

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:45 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.