Rename summed field in a make table query?

AtLarge

Registered User.
Local time
Today, 04:53
Joined
Oct 15, 2008
Messages
70
I have a Make Table query that has a Total: Sum of the field QTY. When I run it, the table data is correct but the field name is SumOfQTY. I would like to leave it as the original field name. Since it's in a unique table I'm not concerned with it being confused with another QTY field.

How can I keep the same field name in the new table? :confused:
 
You can force the field name of your destination field by using the field name as the alias. If the SQL of your original query looks something like this:
Code:
SELECT MyTable.Part, Sum(MyTable.Qty) AS [B][I][COLOR="Blue"]SumOfQty[/COLOR][/I][/B]
INTO MyNewTable
FROM MyTable
GROUP BY MyTable.Part;
You can change it to this:
Code:
SELECT MyTable.Part, Sum(MyTable.Qty) AS [B][I][COLOR="DarkGreen"]Qty[/COLOR][/I][/B]
INTO MyNewTable
FROM MyTable
GROUP BY MyTable.Part;
 

Users who are viewing this thread

Back
Top Bottom