Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ORA-00936 error when using Access2003

Status
Not open for further replies.

aruba

Programmer
Sep 5, 2003
47
When I execute the query below in Access2003 I receive the above error however it works fine in Access97. Any suggestions for modifying it in Access 2003?
Thanks!
SELECT TEMPUS_PERIOD_ACTUALS.PA_PEREND_DT AS WEEK, Sum([TEMPUS_PERIOD_ACTUALS]![PA_REG_HRS]+[TEMPUS_PERIOD_ACTUALS]![PA_OT_HRS]) AS HOURS, Sum(TEMPUS_PERIOD_ACTUALS.PA_REG_HRS) AS PA_REG_HRS, Sum(TEMPUS_PERIOD_ACTUALS.PA_OT_HRS) AS PA_OT_HRS, TEMPUS_EMPLOYEE.EMP_EMPLOYEE_TYP
FROM TEMPUS_EMPLOYEE INNER JOIN (TEMPUS_ORG_WRKGRP_XREF INNER JOIN TEMPUS_PERIOD_ACTUALS ON TEMPUS_ORG_WRKGRP_XREF.OW_ORG_ID = TEMPUS_PERIOD_ACTUALS.PA_ORG_ID) ON (TEMPUS_PERIOD_ACTUALS.PA_EMP_ID = TEMPUS_EMPLOYEE.EMP_ID) AND (TEMPUS_EMPLOYEE.EMP_ORG_ID = TEMPUS_PERIOD_ACTUALS.PA_ORG_ID)
GROUP BY TEMPUS_PERIOD_ACTUALS.PA_PEREND_DT, TEMPUS_EMPLOYEE.EMP_EMPLOYEE_TYP
HAVING (((TEMPUS_PERIOD_ACTUALS.PA_PEREND_DT)=[Input week end date mm/dd/yyyy]));
 
It is, it's the error for 'Missing Expression'.

Cheers

HarleyQuinn
---------------------------------
Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
How do I tell what the missing expression is?
 
not sure why you have ! here:
Code:
SELECT TEMPUS_PERIOD_ACTUALS.PA_PEREND_DT AS WEEK, Sum([TEMPUS_PERIOD_ACTUALS][b]![/b][PA_REG_HRS]+[TEMPUS_PERIOD_ACTUALS][b]![/b][PA_OT_HRS]) AS HOURS, Sum(TEMPUS_PERIOD_ACTUALS.PA_REG_HRS) AS PA_REG_HRS, Sum(TEMPUS_PERIOD_ACTUALS.PA_OT_HRS) AS PA_OT_HRS, TEMPUS_EMPLOYEE.EMP_EMPLOYEE_TYP
FROM TEMPUS_EMPLOYEE INNER JOIN (TEMPUS_ORG_WRKGRP_XREF INNER JOIN TEMPUS_PERIOD_ACTUALS ON TEMPUS_ORG_WRKGRP_XREF.OW_ORG_ID = TEMPUS_PERIOD_ACTUALS.PA_ORG_ID) ON (TEMPUS_PERIOD_ACTUALS.PA_EMP_ID = TEMPUS_EMPLOYEE.EMP_ID) AND (TEMPUS_EMPLOYEE.EMP_ORG_ID = TEMPUS_PERIOD_ACTUALS.PA_ORG_ID)
GROUP BY TEMPUS_PERIOD_ACTUALS.PA_PEREND_DT, TEMPUS_EMPLOYEE.EMP_EMPLOYEE_TYP
HAVING (((TEMPUS_PERIOD_ACTUALS.PA_PEREND_DT)=[Input week end date mm/dd/yyyy]));

Leslie

Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual

Essential reading for anyone working with databases:
The Fundamentals of Relational Database Design
Understanding SQL Joi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top