Two Tables with Left Outer Join & Where Clause



Hello,

I'm trying to link two tables... one for Employees and the other for
Timecards

I need to get a list of employees that do not have timecards on an
SPECIFIC DATE

I tried the follonwing

SELECT Employess.EmployeeID
FROM Employees LEFT OUTER JOIN Timecards on Employees.EmployeeID =
Timecards.lmpEmployeeID
WHERE lmpEmployeeID is NULL and lmpTimecardDate = '10/24/2007'

But it doesn't work. However, when I comment the date condition out
(lmpTimecardDate = '10/24/2007') it works all right but It's not what
I need

Another interesting point... if I use the following query... it works
all right

SELECT Employess.EmployeeID
FROM Employees
WHERE Employees.EmployeeID not in (select Timecards.EmployeeID from
Timecards
where TimecardDate = '10/24/2007')

I'd like to be able to use the Left Outer Join option.... Am I doing
something wrong?... or is it that if It doesn't like the condition I'm
usgin in the WHERE clause (TimecardDate = '10/24/2007')

Thanks for your help

Pablo

.



Relevant Pages

  • Re: DCount Code Problem ?
    ... >> The db is a invoice database. ... >> history of payments, count how many employees worked on what job, what ... >> help with is the sub-form Time And Hours on the main form TimeCards, ...
    (microsoft.public.access.forms)
  • Re: Two Tables with Left Outer Join & Where Clause
    ... WHERE lmpEmployeeID is NULL and lmpTimecardDate = '10/24/2007' ... in the outer table, Employees in this case. ... from the Timecards table, but for the employees there there is no timecard, ...
    (comp.databases.ms-sqlserver)
  • Re: Two Tables with Left Outer Join & Where Clause
    ... WHERE lmpEmployeeID is NULL and lmpTimecardDate = '10/24/2007' ... in the outer table, Employees in this case. ... from the Timecards table, but for the employees there there is no timecard, ...
    (comp.databases.ms-sqlserver)
  • Re: DCount Code Problem ?
    ... > The db is a invoice database. ... > help with is the sub-form Time And Hours on the main form TimeCards, ... >> Van T. Dinh ... >>> I need to get the number of records that have more than 2 employees on ...
    (microsoft.public.access.forms)
  • Re: Two Tables with Left Outer Join & Where Clause
    ... I need to get a list of employees that do not have timecards on an ... WHERE lmpEmployeeID is NULL and lmpTimecardDate = '10/24/2007' ... I'd like to be able to use the Left Outer Join option.... ...
    (comp.databases.ms-sqlserver)