Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 185
  • Last Modified:

UNION ALL

How do I get the results from a UNION ALL query into a new table?

Tried  "INTO "TableName"", works with regular query but not with UNION ALL
0
DatabaseDek
Asked:
DatabaseDek
1 Solution
 
Rey Obrero (Capricorn1)Commented:
you have to either save the union query  and use it to create a make table query or do this

Select A.* Into Tablename
From
(select f1,f2 from tablex
 union all
select f1,f2 from tableY
) As A
0
 
DatabaseDekAuthor Commented:
Couldn't get much simpler thank that! My thanks Derek
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now