Best way to do this? Opinions requested

VorLag

Board Regular
Joined
May 13, 2013
Messages
205
I have a database that has a very large table with queries built off of it. Every week or so, the data in the table needs to be deleted and replaced with a new set of data. The column headings are always the same. Right now, I have a macro that deletes the data and uploads a new file. Every time I do that though, the database needs to be compacted because those actions bloat the size of the database. I do this because the queries are built off of this one table and I don't want to have to rebuild 30+ queries every time I import a new table.

So, what I have WORKS, but I'm not convinced that what I'm doing is the best way to do this. I am curious to see what other people's opinions are of this. How would you approach a similar situation?
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Are you writing an UPDATE query or actually deleting the table (via DELETE query or other method)?
 
Upvote 0
Assuming you are just deleting the table data and not the actual table itself, that is exactly how I would approach it. I have a handful of databases that I created that worked exactly in this manner. I have most of them set to "Compact on Close", so the Compact/Repair happens automatically when the database closes. Just note that "Compact on Close" can be a little fluky, especially if you have a lot of users using the database. If it is just one person/process though, I have not really had too many issues with that functionality.
 
Upvote 0

Forum statistics

Threads
1,221,834
Messages
6,162,268
Members
451,758
Latest member
lmcquade91

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top