Share via

MS query erases alias

Anonymous
2012-01-06T18:27:15+00:00

Working in XL2010, I've built a complex MS Query that begs for the use of an alias for fields such as "date_format(ct.contact_date, '%b')" .  There is a KB article on modifying the registry so that 2007 can use aliases, so I tried the same fix for 2010.  No luck.

How can I get an alias into an MS Query in Excel 2010?

Thanks.

George

Microsoft 365 and Office | Excel | 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
2012-01-07T04:57:27+00:00

Curiously, while MS Query will remove all aliases used in a SQL statement, modifying the command text in the Connection Properties, Definition tab allowed aliases.  At least when all columns had aliases were the aliases reflected in the worksheet.  I had tried a single column without success, but when the alias wasn't erased I tried naming all of them.

I consider the issue resolved, although it sure would be nice if MS Query played more nicely.

George

Was this answer helpful?

2 people found this answer helpful.
0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Anonymous
    2016-02-19T16:01:37+00:00

    Because of the MSQUERY removing 'Aliases' in Excel.  I now create a pass-through query using MS Access, with aliases.  Using Excel, I connect to that query and the 'Aliases' are intact!

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2015-04-18T14:38:07+00:00

    Thank you for this.  Definitely a very clumsy way to have to handle it.  At least it works!

    Was this answer helpful?

    0 comments No comments
  3. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more