Make Tables Using Parameters From Table

magicarty

New member
Local time
Today, 03:36
Joined
Jun 12, 2013
Messages
7
I've got a table of associate directors "t_ADnames" and want to build separate tables for each AD name that pulls a pass through query from our data warehouse. I'm thinking it's got to be done with a macro somehow? So it would run pass_query where AD name = "John" and insert into t_john, then it would check the next name in t_ADnames and run the same query for say "Mark" and insert all his data into t_mark and so on until the list (of about 12 people) has been completed. Thoughts?

Many thanks.
 
Thoughts?

Yes, 2: Why? and Don't?

That's not how databases are to work. What do you hope to accomplish by doing this?
 
I currently have Access use a pull through query to grab about 60 columns and about a million rows of data from our data warehouse via ODBC connection. Then I basically use Access as a pivot cache for an Excel doc to make everything prettier and easier to use for my customers. Unfortunately, they "need" all of this subscriber data to make sales calls and run other reports, so I can't really limit it any more. What I CAN do to make the pivot tables cache the data faster is break up the million rows into smaller table chunks by Associate Director, and get about 100k instead as I've been getting complaints that the reporting is too slow (which it is). My thought was to have Access run the same query that builds the 1M row table, but then in the where clause, it would use each AD's name from a list (table) and chunk out the 100k tables instead. The net data size is the same, but with the smaller pivot caches, it should run much faster. Everything is automated using the old method, but of course it takes hours and I was looking for help on how to accomplish using vba or whatever to try my new idea.

What's the better way to do this?
 

Users who are viewing this thread

Back
Top Bottom