本帖最后由 DADAJIU 于 2009-07-02 22:23:10 编辑

解决方案 »

  1.   

    就是相同“NO”值的,num就相加来表示合并
      

  2.   

    select no,sum(num) from .. group by no
      

  3.   

    create table lin_test(no int,num int)
    insert into lin_test select 1,100
    union all select 1,100
    union all select 2,100
    union all select 3,500
    union all select 4,300
     select no,sum(num) num into # from lin_test group by no
    select * from #go
    drop table lin_test