create function ReverseNumbers (@str varchar(max))
returns varchar(max)
as
begin
declare @output varchar(max)
set @output = ''
declare @i int
set @i = charindex('/',@str)
while @i>0
begin
set @output = '/'+left(@str,@i-1) + @output
set @str = stuff(@str,1,@i,'')
set @i = charindex('/',@str)
end
set @output = @str + @output
return @output
end
go
|