gz...
我的是sql2000,测不出...

解决方案 »

  1.   

    在sql7.0下,若需要得到结果,该如何做。
    题中已写明需要的结果。
      

  2.   

    --用临时表
    select a.id,a=cast('' as varchar(8000)),b.[status-chinese]
    into #t from talbe1 a,table2 b 
    where a.[status-id]=b.[status-id]
    order by a.id,b.b.[status-id]declare @id varchar(10),@s varchar(8000)
    update #t set @s=case @id when id then @s+'/'+[status-chinese] else [status-chinese] end
    ,a=@s,@id=id
    select id,[status-chinese]=max(a)
    from #t
    group by id
      

  3.   

    用临时表仍有问题,要得到此结果,必须生成临时表。
    但,我的table1在不断增大,而要得结果去不断生成临时表,有很麻烦。
    zjcxc(邹建)有更好的方法吗??
    比如存储过程,之类的解决方法。