declare @S VARCHAR(1000)declare @ssum VARCHAR set @ssum=0.0 set @S='招待蓝德堡胶水二人花132元.' set @S=replace('招待蓝德堡胶水二人花132元.','\','') set @S=replace('招待蓝德堡胶水二人花132元.','\\','') WHILE PATINDEX('%%',@S)>0begin IF PATINDEX('%%',@S) = 1 BEGIN SET @S = STUFF(@S,PATINDEX('%%',@S), 1, ''); END else BEGIN SET @ssum=cast(@ssum as numeric(18,2))+cast(substring(@S,0,PATINDEX('%%',@S)) as numeric(18,2)) set @S=substring(@S,PATINDEX('%%', @S),len(@S)) ENDend