Share via

Alias for a query result

Anonymous
2011-08-04T23:42:06+00:00

I am trying to get representative values for groups of records by applying a succession of queries that choose the max of a group of values, and then sum of those results to arrive at a final aggregate representative value.  The problem of course is that the final results is described as thesumofthemaxofvariablename rather than some simpler title. As the queries go on, I have created descriptions, captions and the like for each step, but this gets tedious as all of these descriptions and captions must be generated  at each stage even if the variable is simply being carried through and not modified.

My question is "Is there a way to rename a query result so that from a certain stage onward the variable name is descriptive without being so long.?"

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2011-08-04T23:45:52+00:00

In query design view, enter the alias before the field name.

Field: MySum: NameOfField

In SQL

SELECT Sum(NameOfField) as MySum

FROM SomeTable

...

Was this answer helpful?

0 comments No comments

0 additional answers

Sort by: Most helpful