create table t(col varchar(20))
insert t
select 'A' union all
select 'B' union all
select 'C' union all
select 'D'
go
create function f_he(@col varchar(20))
returns varchar(50)
as
begin
   declare @sql varchar(50)
   set @sql=''
   select @sql=@sql+'-'+col from t where col>=@col
   return(stuff(@sql,1,1,''))
end
goselect dbo.f_he('A')drop function f_he
drop table t-------------------------------------------------- 
A-B-C-D(所影响的行数为 1 行)