IF LEN(@RetVal) > 0
SET @RetVal = LEFT(@RetVal, LEN(@RetVal) - 1)
--PRINT @RetVal
RETURN @RetVal
END
GO
-- 测试
SELECT Column1, dbo.ConvertVertToHorz(Column1) Column2 FROM (SELECT DISTINCT Column1 FROM VertToHorzSample) t
/**//*
Column1 Column2
----------- ------------------
1 A,B
文章来源于领测软件测试网 https://www.ltesting.net/