declare @bb
varchar(50)
declare @cc varchar(50)
set @cc=''
declare test SCROLL cursor for
select [name] from 表名
open test
while(@@fetch_status=0)
begin
fetch from test
into @bb
set @bb=@bb+'#'
set @cc=@cc+@bb
end
print substring(@cc,1,len(@cc)-1-len(@bb))
close test
deallocate test