Twerker Takkerz
Twerker Takkerz

Reputation: 45

Making a new table from an Access Query result

I am trying to create a local table which is a replica of a table created from a query I have made on Access. I made the query on Access using SQL code.

I have tried to use the INTO command, however I do not know what the query result table will be called so not sure what the FROM value would be. The tables are linked tables and the SQL code is just combining them, the issue came when I tried to edit the data and couldn't so Im trying to put them into a local table to solve that issue.

Select * from [Rack 1]
UNION ALL
Select * from [Rack 2]
UNION ALL
Select * from [Rack 3]
UNION ALL
Select * from [Rack 4];

Screenshot showing my SQL query, linked tables and the query when ran.

I have over 100 linked tables all with the same columns and all combined with the UNION ALL command, I have made the example above to show how my SQL code looks. I expect to be able to edit the data however I keep getting a error saying "This Recordset is not updateable", so my intended result is to create a new local table I can edit.

Upvotes: 1

Views: 932

Answers (1)

antwilson1720
antwilson1720

Reputation: 330

One way to solve your issue is to create a new query which says the following:

SELECT *
INTO [Insert Table Name Here]
FROM [Insert Query Name Here]

For example using one of your queries from the screenshot:

SELECT *
INTO [Query 34 & 35]
FROM [Query 34 & 35]

Hope this helps!

Upvotes: 1

Related Questions