赞
踩
insert into #check_wl
select t1.FItemID PId,t2.FItemID,t2.FQty
from ICBOM t1 left join ICBOMCHILD t2 on t1.FInterID =t2.FInterID where and FUseStatus=1072 and t2.FItemID>0
union all
select t1.FItemID PId,t2.FItemID ,t2.FQty from ICBOM t1 left join ICBOMCHILD t2 on t1.FInterID =t2.FInterID
where and FUseStatus=1072 and t2.FItemID>0
union all:并联的两个查询的字段数必须一致
insert into 已存在表名
select * from tablea
union all
select * from tableb
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。