"Tom Baxter" <as*****@juno.comwrote in
news:11********************@i42g2000cwa.googlegrou ps.com:
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. 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").
Yes, to rename a field or expression is easy. In SQL you simply
add the statement AS NewName after the field declaration.
In hte query builder, you prefix the name or expression with the
newname followed by a colon. In your case that aliasing of the
field name might need to happen in the query with the inner
join.
SQLexample = "select long.horrible_fieldname sa X from
Querybuilder X: long.horrible_fieldname
--
Bob Quintal
PA is y I've altered my email address.
--
Posted via a free Usenet account from
http://www.teranews.com