Sum aggregate function gives syntax error

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").
 
P

Pat Hartman\(MVP\)

You can alias column names as you select them:

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top