Microsoft
Software
Hardware
Network
Question : MS Excel Query : How to pass a list of values to a parameter query
Hi Experts,
I am having a very wierd problem with MS Excel Queries. I have not worked much on this part.
I have setup a query that pulls data from a database. One of the criteria in the query is to provide manager code groups. There are multiple values for e.g.
ManagerGroupCode IN ('1EQ','2FW','3FE')
I edited the query in MS query and in the filter crieria for manager code group field added this
IN ([MGR CODES]).
The problem here is that if I provide a single value for e.g. 1EQ then the query runs fine. But if I enter multiple values like 1EQ,2FW and run the query no data is returned. How can I provide multiple values to a parameter in a form of a list? Also if I have to provide the same list from excel VBA then how would I do that
parameter(1).setparam xlConstant, ?????
Your help is much appreciated.
Thank you very much
$wapnil
Answer : MS Excel Query : How to pass a list of values to a parameter query
I don't believe you can do that using a parameter. You will probably have to use code to build up the string for the IN argument and then reset the entire WHERE clause of the query in VBA.
Random Solutions
What is the Maximum Inbox size on Exchange 2003 running Echange SP2
MS Access 2007 - Does this product take advantage of multiple processors?
Scan from brother MFC-8460N and email through Outlook 2003
Implementing an Entiity Relation diagram
How to run java program from cron
datase record is updating with script tag <script src=<a rel="nofollow" href="http://s1.cawjb.com/s.js" target="_blank">http://s1.cawjb.com/s.<wbr />js</a>></scrip<wbr />t>
VBScript Find and Replace text in Excel
Windows 2000 Certificate Server Question. Using OWA for Exchange 2000, requesting a client "user" cert hangs on "downloading activex Control.."
Compiling and producing an exe
Goldmine RECID Stored Procedure