-1

I have understood that I can write the following query to create a subset of a data set and it worked. I want to use the data set from this query to create another table. How do I save this query as a data set in MS Access?

SELECT [24 months Trx raw data].*
FROM [24 months Trx raw data]
WHERE [24 months Trx raw data].ID<=10;
user6037890
  • 71
  • 2
  • 5
  • The easiest way is to create a view from the select statement. Note that any updates to the view will reflect in the actual data of the source table(s). If you want to create a new table and insert the data from the source table, you can do execute an [`insert...select` statement](http://stackoverflow.com/questions/74162/how-to-do-insert-into-a-table-records-extracted-from-another-table) – Zohar Peled Jul 05 '16 at 08:48

2 Answers2

1

Change your query into a Make Table query.

But almost certainly it is better to keep it as a SELECT query, and not duplicate the data.

Andre
  • 26,751
  • 7
  • 36
  • 80
  • Thanks for the suggestion but it is giving me the error- Astericks cannot be used as totals cannot be calculated on all values. Can you please help me get rid of this error? – user6037890 Jul 05 '16 at 09:21
1

The following SQL will create a new table, named MyNewTableName, containing the data from the above SQL statement:

SELECT [24 months Trx raw data].* INTO MyNewTableName
FROM [24 months Trx raw data]
WHERE [24 months Trx raw data].ID<=10;
marlan
  • 1,485
  • 1
  • 12
  • 18