Hi All,
I’m having issues with MS Query in Excel 2010 and I’m trying to figure out if this is a driver or some other problem. The data source is DB2. Before we downgraded to Office 2010 everything was hunky dory in WinXP/Office 2003. Has anyone else had a problem that sounds like this, and if so, what did they do to resolve it?
The following query works great in MS Access 2010:
SELECT LOCN_PHY_POST_CDE, LOCN_PHY_POST_EXT, [LOCN_PHY_POST_CDE] & IIf([LOCN_PHY_POST_EXT]=’0000′,”,’ – ‘ & [LOCN_PHY_POST_EXT]) AS ZIP4
FROM MYDB;
but I can’t seem to make the equivalent work in MS Query/Excel 2010. I get a lot of “Cannot display graphically” problems followed by other errors. First, the brackets generated the error: Incorrect Column Expression: ‘[‘
So I simplified it down to the following:
SELECT LOCN_PHY_POST_CDE, LOCN_PHY_POST_EXT, LOCN_PHY_POST_CDE & LOCN_PHY_POST_EXT
FROM MYDB
(For the record, I also tried using + with no change in outcome.)
and now my error is something along the lines of “Did not expect LOCN_PHY_POST_CDE following Select statement.”
Well if MS Query doesn’t expect a field name following a Select statement, then certainly I don’t know how to talk to it.
Any help or pointers or suggestions appreciated. Even a “it’s a driver thing” would help, but even better would be some proof of such to send to the IT guys who don’t believe me that anything’s wrong.
TIA!