开发者

How TO join many tables into one in Access

开发者 https://www.devze.com 2022-12-10 13:05 出处:网络
I had a table with some 25000 records and 75 fields. For easier analysis i broke them down into 开发者_JAVA百科10 tables with 2500 records each. now i want to put them back together to form a single t

I had a table with some 25000 records and 75 fields. For easier analysis i broke them down into 开发者_JAVA百科10 tables with 2500 records each. now i want to put them back together to form a single table. how do i write a query. i tried a select query like select * from (table1, table2.....) but i get error as query is too complex.

tksy


Explicitly select the field, to ensure a perfect match when you use UNION.

For example,

SELECT
    FirstName,
    Surname
FROM
    tblCustomer1

UNION

SELECT
    Name [Firstname],
    Surname
FROM
    tblCustomer2

Select the specific columns you want and make sure they are all named identically and contain the same data type.


select * from tableA
union
...
select * from tableN
0

精彩评论

暂无评论...
验证码 换一张
取 消