Sum aggregate function gives syntax error

  • Thread starter Thread starter Tom Baxter
  • Start date Start date
T

Tom Baxter

I have a numeric column in a query called Prov1.Volume. When I try
taking the sum of that column (using SUM aggregate function in Design
View) it gives a syntax error. It says that SumOfProv1.Volume is an
invalid name. How do I get around this error? (note: the name is
Prov1.Volume because the column name came from an inner join. There's
also
a Prov2.Volume. Is there
a way to rename this column and possibly thereby avoid the error? Sums

of other columns work fine, since they have simple names like
"Sensor").
 
You can alias column names as you select them:

Select Prov1.Volume As VolumeProv1, Prov2.Volume As VolumeProv2, fldA, fldB,
etc.
 
Back
Top