user3737057
user3737057

Reputation: 121

How can I UNION ALL on all columns of a table in Access

I have two select queries with the same number of columns (c.150) and I am trying to UNION ALL the two with:

SELECT * 
FROM query1

UNION ALL

SELECT * 
FROM query2

I am getting the error "Too many fields defined", but I understand that Access can process 255 fields? Given I don't want to have to write out every field name within each of my select queries, is there a practical way to achieve this union?

Upvotes: 0

Views: 2493

Answers (1)

user3737057
user3737057

Reputation: 121

As Parfait mentions in his comment, this error is caused as Access is counting the column count of each of my tables towards the limit. 150 + 150 > 255 => Too many fields defined. See a similar question here.

Provided you don't have too much data, an alternative is to write one into a table and append the other into the same table.

Upvotes: 1

Related Questions