S
Steve Happ
Hello:
I just upsized an Access 2003 application to a SQL Server 2000 back end.
There is a query that worked fine before the upsize, but does not work now.
The purpose of the query is to give me a list of employees that are
scheduled to work today. The employee master row has 7 checkboxes for the
days of the week.
Here is the SQL for the query. Can someone tell me how to make this work
with the SQL Server BE?
SELECT EmployeeQry.EmpID, EmployeeQry.EmpLast, EmployeeQry.EmpFirst,
EmployeeQry.EmpSSN, EmployeeQry.EmpDept, EmployeeQry.Monday,
EmployeeQry.Tuesday, EmployeeQry.Wednesday, EmployeeQry.Thursday,
EmployeeQry.Friday, EmployeeQry.Saturday, EmployeeQry.Sunday
FROM EmployeeQry
WHERE (((EmployeeQry.Monday)=IIf(Format(Date(),"dddd")='Monday',True))) OR
(((EmployeeQry.Tuesday)=IIf(Format(Date(),"dddd")='Tuesday',True))) OR
(((EmployeeQry.Wednesday)=IIf(Format(Date(),"dddd")='Wednesday',True))) OR
(((EmployeeQry.Thursday)=IIf(Format(Date(),"dddd")='Thursday',True))) OR
(((EmployeeQry.Friday)=IIf(Format(Date(),"dddd")='Friday',True))) OR
(((EmployeeQry.Saturday)=IIf(Format(Date(),"dddd")='Saturday',True))) OR
(((EmployeeQry.Sunday)=IIf(Format(Date(),"dddd")='Sunday',True)));
Thanks
Steve
I just upsized an Access 2003 application to a SQL Server 2000 back end.
There is a query that worked fine before the upsize, but does not work now.
The purpose of the query is to give me a list of employees that are
scheduled to work today. The employee master row has 7 checkboxes for the
days of the week.
Here is the SQL for the query. Can someone tell me how to make this work
with the SQL Server BE?
SELECT EmployeeQry.EmpID, EmployeeQry.EmpLast, EmployeeQry.EmpFirst,
EmployeeQry.EmpSSN, EmployeeQry.EmpDept, EmployeeQry.Monday,
EmployeeQry.Tuesday, EmployeeQry.Wednesday, EmployeeQry.Thursday,
EmployeeQry.Friday, EmployeeQry.Saturday, EmployeeQry.Sunday
FROM EmployeeQry
WHERE (((EmployeeQry.Monday)=IIf(Format(Date(),"dddd")='Monday',True))) OR
(((EmployeeQry.Tuesday)=IIf(Format(Date(),"dddd")='Tuesday',True))) OR
(((EmployeeQry.Wednesday)=IIf(Format(Date(),"dddd")='Wednesday',True))) OR
(((EmployeeQry.Thursday)=IIf(Format(Date(),"dddd")='Thursday',True))) OR
(((EmployeeQry.Friday)=IIf(Format(Date(),"dddd")='Friday',True))) OR
(((EmployeeQry.Saturday)=IIf(Format(Date(),"dddd")='Saturday',True))) OR
(((EmployeeQry.Sunday)=IIf(Format(Date(),"dddd")='Sunday',True)));
Thanks
Steve