I need to create a spreadsheet that allows a user to input a column of data that will then be used, one value at a time, as a parameter in an SQL query. For instance, my query would be something like :
SELECT A, B, D, K, R
FROM TABLE1, TABLE2, TABLE3
WHERE A= D AND K= R AND (B=?)
so that the values from the column of data are used in the comparison to B.
Am I making any sense? If so, is there a way to do this? Much obliged at any help you could provide.
When you import the Query into Excel, edit the query in the Microsoft Query editor.
Once in the editor, activate the Criteria view (View -> Criteria). Add each field that you want user input.
For the criteria of each field, put [A DISCRIPTION].
Once you are done, go to File -> Return Data to Microsoft Office Excel. For each user unput pop-up, just leave it blank.
Once you have selected a location for your data, a pop-up will ask you for user input for the criterias you have entered. Point it to your desired cell.
Unfortunately, what you've suggested only allows me to use the value from a single cell as input.
What I want is to give it a column and have it generate the data using each cell from that column and output the results. From the digging I've done since first posting, I think that may not be supported. Am I correct in thinking that?
If you are using Access, all you have to do is link the table to the excel work sheet then you write your Query.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks