Unfortunately, this doesn't work. I implemented it into the macro in this way:
%MACRO EXPORT_TABLE(table, database, name);
LIBNAME ACC &database.;
PROC DATASETS LIB = ACC NOPRINT;
DELETE &name.;
QUIT;
PROC EXPORT
DATA = WORK.&table.
OUTTABLE = "&name."
DBMS = ACCESS REPLACE;
DATABASE = &database.;
RUN;
%MEND;
%EXPORT_TABLE(Somename, "path.mdb", Anothername);
Log says that the libname was successfully assigned, also 'Deleting ACC.tablename"... but still, the file size is increasing.
Edit:
When using with DIRECT_EXE and PROC SQL:
LIBNAME ACC &database. DIRECT_EXE = DELETE;
PROC SQL; DELETE FROM ACC.&name.; QUIT;
LIBNAME ACC CLEAR;
It seems like working. The table itself is not deleted but just cleared (ie it is empty). However, the size doesn't apparently change.
Thank you for the solution.