Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Delete Tables in Access Database

danielasmith
5 - Atom

Hi All,

 

I'm very new to Alteryx, but I'm loving it so far.  :)

 

 

My issue is that I'm outputting my data into multiple Access databases based on Customer Name which each  have multiple tables within them (each customer is located in a folder based on Customer Name).  However there are times when some of the tables when I run the workflow will not have any data to output.  However if I ran the workflow previously there will be a table  in the database with database from the previous month.

 

I have Excel reports that link to these tables that I refresh monthly.  So if  there is a table from the previous month in the DB it will refresh in my report even though there isn't any data for the current month, if that makes sense.  So I want all tables to either be dropped or all the data to be deleted in each DB before the data is output to the tables.  That way I know that each table contains new data for the month and not what was left there from the previous month.  Otherwise i have to open each DB and delete the old tables so that my reports will not pick up that data.

 

So here's the path the DB is going to based on Customer Name and Stats is the name of each table.

 

image.png

 

 

 

And this is a sample of the tables written to the Discrepancies DB:

 

 

 

image.png

 

 

 

Every month it's possible that there will not be data for each of these tables so I want to delete all of them first before the new tables are created.  Is this possible?

 

Thanks in advance for any assistance!

Daniela

 

 

 

 

 

 

2 REPLIES 2
JohnJPS
15 - Aurora

 

 

A simple trick is to write an empty dataset back to the same table, which can be done inline:

 

dropAccess.png

 

See also: @patrick_mcauliffe's more in-depth treatment here.

 

sunnyzwei
5 - Atom

Thank you!  I haven't had a chance to try it yet but I appreciate your response!

Labels