Running a simple query

  • Thread starter Thread starter Lucinda
  • Start date Start date
L

Lucinda

Hi,

I am very new to Access ADP and SQL. In other words I am in over my head.
I am trying to write a query to sum Vacation Hours As Total Vacation Hours.
I am receiving Incorrect Syntax near the keyword 'AS'.

This worked in regular MDB Access so any help or advice would be greatly
appreciated.
 
You did not post your DML.
the sql should be the same though...
However, from what you've wrote...
try Sum([Vacation Hours]) as 'Total Vacation Hours'
hth,
bob
 
thank you. I found that if I removed the commas, it worked like a charm.
SELECT EMPLID, NAME, SUM([Vacation Hours Used 1] + [Vacation Hours Used
2] + [Vacation Hours Used 3] + [Vacation Hours Used 4] + [Vacation Hours Used
5] + [Vacation Hours Used 6] + [Vacation Hours Used 7] + [Vacation Hours Used
8] + [Vacation Hours Used 9] + [Vacation Hours Used 10]) AS Total
FROM LADOLFO.Combination
GROUP BY EMPLID, NAME

Bob McClellan said:
You did not post your DML.
the sql should be the same though...
However, from what you've wrote...
try Sum([Vacation Hours]) as 'Total Vacation Hours'
hth,
bob






Lucinda said:
Hi,

I am very new to Access ADP and SQL. In other words I am in over my head.
I am trying to write a query to sum Vacation Hours As Total Vacation
Hours.
I am receiving Incorrect Syntax near the keyword 'AS'.

This worked in regular MDB Access so any help or advice would be greatly
appreciated.
 
Back
Top