if (select count(isnull(ord,0)) from wk_tmp_StrInc wts)>1
                    then
                    select StrName=StrName+'<sup>'+cast(wts.ord as varchar(5))+'</sup>,' from person_company pc,wk_tmp_StrInc wts 
                        where ltrim(rtrim(wts.company_name))=ltrim(rtrim(pc.company_name)) 
                          and pc.participant_id=person_key
                        order by wts.ord;                
                else
                    select StrName=StrName+',';
                 end if;
以上代码哪里出错啦。谢谢喽!