I’m using Office 2010 and Office 2013 to aggregate data from a SQL data source.
In the past I have had no problems aliasing column names in MS Query but found today that it no longer seemed to work.
It’s not a big problem for regular columns, but for aggregate columns you really need the column name intact if you are going to use the data in Excel for the purposes of working wiht a Pivot Table.
I tried various ways to get this working again and found that query would modify the SQL source and just remove the aliases.
How to use alias column names in MS-Query
I found two solutions to this:
1) Wrap your new column name around square braces, for example “Select odrtyp as [OrderType]”
2) select ‘OrderType’=ordtyp
Just a quick thing, but hope it helps someone. There are a couple of MS articles that detail a similar problem, which didn’t seem to have any impact on my system.