Exporting multiple csv files from a single table

fargher

New member
Local time
Today, 09:51
Joined
Mar 19, 2008
Messages
2
Hi guys. I'm a bit of a noob with Access. I have a table which is 15 rows by 250,000 columns. So there are about 3.75m records.

What I need to do is to get access to export a number of csv files automatically from this table.

I need each csv file to contain all the data in the table for a certain range of rows. This is determined by a value in a particular column. This is a sample of the table.

aljf5s.jpg



Basically Store_Nbr represents a UID for a particular store. All the data is currently in one big table, and I need a single csv file for each different store_nbr (so it contains all the data in the table for each unique store). Also, for each store_nbr, there are different Year Month of Surveys. For each store_nbr, I need a different csv file for each Year Month of Survey. This will probably divide up the 250,000 long table into about 200 csv files, as there are about 50 different Store_nbrs, and there are 4 surveys for each individual store.

Sorry if I've not made myself perfectly clear.

I'm sure there's a simple way of doing it, but I really do suck with access and was wondering if you guys had any idea.

Many many thanks!!!

Cheers
 
Simple, yes. Quick, no.

You need a series of queries. You apply a criterion to the two columns you have identified and this will select only those records that match. Trouble is that this means you'll need two hundred queries.

Are you sure you need 200 csv files?
 
Ahh thanks for the quick reply. Looks like I'll have to go through it manually then.

Thanks
 
dont do it manually

just do a couple of for next loops

for store from start to end
for survey from 1 to 4

it wont take long, especially if you can standardise the output csv names

i think neil just wondered whether you really wanted 200 different reports
 

Users who are viewing this thread

Back
Top Bottom