小鬼之家

流浪,游走于文明与原始之间. 关注底层技术,实现美好生活。

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
Declare myCurrsor Cursor Local For
    
select isnull(First_Name,''+ ' ' + isnull(Last_Name,''as InvestigatorName from dbo.Investigator where Study_ID = @StudyId
    
open myCurrsor
    
Fetch Next from myCurrsor into @InvestigatorName
    
While @@Fetch_Status = 0
    
begin
        
if(@count > 0)
        
begin
            
select @ResultVar = @ResultVar + ''
        
end

        
select @ResultVar = @ResultVar + @InvestigatorName

    
Fetch Next from myCurrsor into @InvestigatorName
    
end
posted on 2008-07-04 11:02  黄尚  阅读(223)  评论(0编辑  收藏  举报