Missing operator error

  • Thread starter Thread starter Denis Dougall
  • Start date Start date
D

Denis Dougall

Can someone point me to where the missing opoerator is

Update Employee
Set Employee.[PPL 2 hour Limit]='yes'
FROM qryAbsentSum
WHERE (((qryAbsentSum.[reason code])='P04') AND
((qryAbsentSum.[CountOfreason code])>1));

Thanks

Denis
 
One problem is that you haven't joined Employee to qryAbsentSum in any way.

What you need is something like

Update Employee Inner Join qryAbsentSum
ON Employee.EmployeeId = qryAbsentSum.EmployeeID
Set Employee.[PPL 2 hour Limit]='yes'
WHERE (((qryAbsentSum.[reason code])='P04') AND
((qryAbsentSum.[CountOfreason code])>1));
 
Thanks very much Doug. When I edited the sql to be concise I deleted to
much. I ended up with Jet not being able to resolve the query as one to one
so I had to create a Table and then update the "live" table from the temp
Table.

Cheers

Denis


Douglas J. Steele said:
One problem is that you haven't joined Employee to qryAbsentSum in any way.

What you need is something like

Update Employee Inner Join qryAbsentSum
ON Employee.EmployeeId = qryAbsentSum.EmployeeID
Set Employee.[PPL 2 hour Limit]='yes'
WHERE (((qryAbsentSum.[reason code])='P04') AND
((qryAbsentSum.[CountOfreason code])>1));


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Denis Dougall said:
Can someone point me to where the missing opoerator is

Update Employee
Set Employee.[PPL 2 hour Limit]='yes'
FROM qryAbsentSum
WHERE (((qryAbsentSum.[reason code])='P04') AND
((qryAbsentSum.[CountOfreason code])>1));

Thanks

Denis
 
Back
Top