LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.links
external usenet poster
 
Posts: 73
Default Run SQL against Access DB/Filter Results

I have an Excel workbook that contains a list of part numbers, anything from
a few to thousands, that need to be priced. A macro opens a connection to an
Access database of ALL known part numbers and gets ALL the prices, which upon
receipt at the Excel end are loaded into an array for further processing
(using the array gets me around the 65535 row limit, as we have ~300,000 part
numbers). There's also some If-Then wizardry that's performed by the SQL to
select the appropriate price from one of three possibilities.

The processing time to pull all the prices for every run is tolerable, but
if possible I'd prefer to set up the process so only the prices for the parts
in my current Excel list are be pulled. I experimented with a loop that runs
each part in the current list as a separate SQL query, but the run time for
that was far longer than just pulling all prices.

I need to figure out a way to use my list of parts as if it were an Access
table, so I can structure my SQL to only pull the prices I'm currently
interested in, rather than the whole 300K prices. I know exactly how I would
do it if I were working in Access, but this has to start from and run in an
Excel environment -- users may not even have Access installed on their PCs.
Who can set me on the right path?


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy Filter Results only Maureno Excel Discussion (Misc queries) 4 November 14th 07 06:47 PM
Why are access query results different in Excel DannyD Excel Discussion (Misc queries) 0 July 29th 07 04:54 AM
Access query results to Excel piano banger Excel Discussion (Misc queries) 4 December 8th 06 09:32 AM
Why won't advanced filter return filter results? jaws4518 Excel Worksheet Functions 5 September 12th 06 06:11 PM
Store Excel Results in Access ernie Excel Discussion (Misc queries) 4 March 9th 06 03:37 PM


All times are GMT +1. The time now is 07:46 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"