| 发表于:2007-04-01 08:55:201楼 得分:40 |
create table icstorckbill(物料名称 varchar(20), 批次 varchar(20), 数量 int) insert icstorckbill select 'a ', '001 ', 20 union all select 'b ', '002 ', 30 union all select 'c ', '003 ', 10 union all select 'd ', '004 ', 40 select id=identity(int, 1, 1), * into #t from icstorckbill select * from ( select * from #t where id%2=1 )a left join ( select * from #t where id%2=0 )b on a.id=b.id-1 | | |
|