CREATE FUNCTION REMOVE_ENTER (@DESC VARCHAR(8000))
RETURNS
VARCHAR(8000)
AS
BEGIN
DECLARE @STR VARCHAR(8000)
SET
@STR=@DESC
WHILE SUBSTRING(@STR,LEN(@STR),1)=CHAR(10) OR
SUBSTRING(@STR,LEN(@STR),1)=CHAR(13)
BEGIN
SET
@STR=SUBSTRING(@STR,1,LEN(@STR)-1)
--PRINT @STR
END
RETURN
@STR
END
sql 去除结尾的回车或者换行,布布扣,bubuko.com
原文地址:http://www.cnblogs.com/lifengqi/p/3724796.html