p2p.wrox.com Forums

Need to download code?

View our list of code downloads.

  Return to Index  

sql_language thread: Access Query -- anybody can help !

Message #1 by "Vani" <vani@a...> on Mon, 25 Mar 2002 10:15:39 +0300
This is a multi-part message in MIME format.

Content-Type: text/plain;
Content-Transfer-Encoding: quoted-printable

Hi All,

I have two tables in Access 2000
tblStaff , tblAttendance

tblStaff          |   tblAttendance

StaffID             Date
name               TimeIn 
...                      ..

I want to write a query to display all the staff members who are absent
in a particular period of time.. lets say between march 1 and march 4..
The staff member name should come even if he is absent for one day in
that period.

I tried this ..
FROM tblStaff
WHERE StaffID not in (SELECT staffid
FROM tblAttendance
WHERE date between #3/1/2002# and #3/4/2002#);

This works fine, if the staff member is absent for all the days in that
particular period.. But my requirement is,  even if the staff is absent
for one day, his name should appear..

How to do this in a single query or using access 2000

thanks in advance

Vani Marata
Al Nadeem Information Technology

  Return to Index