如果#temp已经建好了表:
insert into #temp select * from
(
select * from V_LW_YouhuiDetailByShenFenZheng
union all
select * from V_LW_YouhuiDetailByzhengjian
);
commit;
如果#temp还没有建:
create table #temp as select * from
(
select * from V_LW_YouhuiDetailByShenFenZheng
union all
select * from V_LW_YouhuiDetailByzhengjian
);
select * into #temp from
(
select * from V_LW_YouhuiDetailByShenFenZheng
union all
select * from V_LW_YouhuiDetailByzhengjian
) a
加个别名就行了