posted 1/20/2011 by kylewalker - Views: [1858]
Have you ever been coding away on an MDX query and then out of nowhere, something just stops you dead in your tracks? It happened to me today, but it wasn't a syntax problem or anything like that. It was an accented character in a name that I was referencing. Take the Adventure Works cube for example, there is an employee in the "Employees" hierarchy (in the Employee Dimension) named "Ken J. Sánchez". Unfortunately, if you need to use Mr. Sánchez as an endpoint for a range or a reference of any kind to navigate through your cube, just typing in "Ken J. Sanchez" isn't going to cut it. Unless you know off the top of your head that Alt+0225 will give you an "á" (which I didn't... I had to look it up), you've got some additional work to do. One option is to open up your character map (charmap.exe) and find your character and copy it over to your query
Sooo, what if you don't want to open up yet another program and search through 2764 characters to find yours (yes, I counted them... what?)? There is another option. If you are able to find the specific member easily in your metadata tab, you can just drag it over to your query window...
But wait, now I have the key, not the name! I like names... But now we're back to the accented character problem. Well, just run a simple query like the one above that will bring back the name you want, and copy and paste if from there into your query.
Now you have your required character and you're ready to continue!