|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
以前写过一段查询如下,是整合几个表中的数据,然后copy到总表(All)中进行整合,现在出现问题啦,数据量超过了65550了,没法一次复制了,请问哪个高手能帮忙看一下,是否可以修改一下这段程序,将查询生成一个新表(表名为All) ,在此谢谢啦~
select [All].Version, [All].[Account Code], [All].[Account Name], [All].[Expenses Item], [All].[Expenses Type], [All].[Responsible Dept], [All].Department, [All].Branch, [All].Cities, [All].Account_Year, [All].Account_Month, [All].Amount
FROM [All]
union all
select [All_EB].Version, [All_EB].[Account Code], [All_EB].[Account Name], [All_EB].[Expenses Item], [All_EB].[Expenses Type], [All_EB].[Responsible Dept], [All_EB].Department, [All_EB].Branch, [All_EB].Cities, [All_EB].Account_Year, [All_EB].Account_Month, [All_EB].Amount
FROM [All_EB]
UNION ALL select [All_SB].Version, [All_SB].[Account Code], [All_SB].[Account Name], [All_SB].[Expenses Item], [All_SB].[Expenses Type], [All_SB].[Responsible Dept], [All_SB].Department, [All_SB].Branch, [All_SB].Cities, [All_SB].Account_Year, [All_SB].Account_Month, [All_SB].Amount
FROM [All_SB];
UNION ALL select [All_B0].Version, [All_B0].[Account Code], [All_B0].[Account Name], [All_B0].[Expenses Item], [All_B0].[Expenses Type], [All_B0].[Responsible Dept], [All_B0].Department, [All_B0].Branch, [All_B0].Cities, [All_B0].Account_Year, [All_B0].Account_Month, [All_B0].Amount
FROM [All_B0]; |
|