MAW74656
MAW74656

Reputation: 3539

access query error

I'm getting a syntax error with this access query, but I can't see what it is.

Error: The SELECT statment includes a reserved word or an argument name that is misspelled or missing, or the puntuation is incorrect.

Query:

 SELECT W.[skid number]             AS SkidNum,
       W.job                       AS JobNum,
       W.[job skid number]         AS JobSkidNum,
       W.form                      AS Form,
       W.DATE                      AS DATE,
       W.shift                     AS Shift,
       W.[team member number]      AS Operator,
       W.[roll tender number]      AS Helper,
       W.weight                    AS Weight,
       W. lbs                      AS Pounds,
       ( W.weight / W.lbs ) * 1000 AS Sheets,
       W.press                     AS Press
FROM   [press 1a skid entry] W
UNION ALL
SELECT SF.[skid number]        AS SkidNum,
       SF.job                  AS JobNum,
       SF.[job skid number]    AS JobSkidNum,
       SF.form                 AS Form,
       SF.DATE                 AS DATE,
       SF.shift                AS Shift,
       SF.[team member number] AS Operator,
       SF.[roll tender number] AS Helper,
       ""                      AS Weight,
       ""                      AS Pounds,
       SF.[total sheets]       AS Sheets,
       SF.press                AS Press
FROM   [sheet fed 1a skid entry] SF; 

Upvotes: 1

Views: 129

Answers (2)

Mark K
Mark K

Reputation: 591

You used the word Date, thats a reserved word.

you can view the list of reserved words here

Upvotes: 3

Taryn
Taryn

Reputation: 247650

You have a column called DATE and this is a reserved word in MS Access.

If you want to use DATE then place brackets around it [DATE]

Upvotes: 4

Related Questions