日期:2014-05-17 浏览次数:20670 次
Create table aa (ID varchar(20),ItemCode varchar(20),BOMUsage varchar(20))
GO
insert into aa(ID,ItemCode,BOMUsage)
select 'S20011','13134313', '3' union all
select '215131', 'S20011', '3' union all
select 'Z10211', 'Z10211' , '3' union all
select 'Z10311', 'Z10211', '3' union all
select 'Z10411', 'Z10311' , '3' union all
select 'Z10051', '1313131', '3' union all
select 'Z10811', 'Z10051', '3' union all
select 'Z21011', 'Z15411' , '3' union all
select 'Z13211', '1313131' , '3' union all
select 'Z10431', 'Z11211', '3' union all
select 'Z14511', 'Z14511' , '3' union all
select 'Z15411', '1313131', '3' union all
select 'Z11211', '1313131', '3' union all
select 'S20011', '13134313' , '3' union all
select '215131', 'S2001' , '3' union all
select 'Z10211', '1313131' , '3' union all
select 'Z10311', 'S20011' , '3' union all
select 'Z10411', '1313131', '3' union all
select 'Z10051', '1313131' , '3' union all
select 'Z10811', '1313131', '3' union all
select 'Z21011', 'Z10811' , '3' union all
select 'Z13211', '1313131' , '3' union all
select 'Z14511', 'Z13211', '3' union all
select 'Z15411', 'Z10431', '3' union all
select 'Z11211', '1313131', '3'
GO
Create table bb (VerID varchar(20),BOMUsg varchar(20))
GO
insert into bb(VerID,BOMUsg)
select 'S20011','z' union all
select '215131','3' union all
select 'Z10211','z' union all
select 'Z10311','3' union all
select 'Z10411','3' union all
select 'Z10051','3' union all
select 'Z10811','3' union all
select 'Z21011','z' union all
select 'Z13211','3' union all
select 'Z10431','z' union all
select 'Z14511','3' union&nbs