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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Syntax Error

Status
Not open for further replies.

NC1977

Programmer
Nov 26, 2007
22
0
0
CA
I keep getting this stupid stupid stupid error everytime I try to query this table:

Syntax error (missing Operator) in query expression. Here is my query. The thins is I actually created this query with the wizard.....

SELECT [Matrix Query].Division, [Matrix Query].[Succession plan], [Matrix Query].[Temp workforce], [Matrix Query].Union, [Succession Plan].Description AS [Succession Plan_Description], [Succession Plan].Definition AS [Succession Plan_Definition], [Succession Plan].Rate AS [Succession Plan_Rate], [Temp Workforce].Rate AS [Temp Workforce_Rate], [Temp Workforce].Description AS [Temp Workforce_Description], [Temp Workforce].Definition AS [Temp Workforce_Definition], Union.Rate AS Union_Rate, Union.Description AS Union_Description, UNION .Definition AS Union_Definition FROM (([Matrix Query] INNER JOIN [Temp Workforce] ON [Matrix Query].[Temp workforce]=[Temp Workforce].Rate) INNER JOIN [Union] ON [Matrix Query].Union=Union.Rate) INNER JOIN [Succession Plan] ON [Matrix Query].[Succession plan]=[Succession Plan].Rate;

What am I doing wrong??
 
The last field in your select clause you have

Code:
UNION .Definition

and there should be no space...

Code:
UNION.Definition

I suspect as it is written it is fine aside from the above error but the other thing that has me supicious is that UNION is a SQL (Access) keyword. Everywhere it is either a table or field name you might need square brackets around it. The below would be the Name Field from the Union Table (Name is an Access keyword). The brackets are optional unless Access gets it confused for some reason (commonly spaces in the table or field name).

Code:
[Union].[Name]

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top