0

I like to create an empty table from a (pivot) query in Microsoft Access (using Office 365 1902). With the help of this post I found a solution with one shortcoming:

SELECT TOP 1 * INTO tblNew FROM qryMyQuery;

The shortcoming is that tblNew contains one record which needs to be deleted to get an empty table. Access 365 can not process SELECT TOP 0 * INTO.

I post this primarily because other people may have the same question and run into the same problem. I can work with my solution, but maybe somebody has a better one?

martin.lindenlauf
  • 382
  • 1
  • 2
  • 14

1 Answers1

1

The solution is very simple:

SELECT * INTO tblNew FROM qryMyQuery WHERE False;

Since the WHERE condition matches 0 rows, 0 rows get copied.

Erik A
  • 31,639
  • 12
  • 42
  • 67