--写个函数吧
CREATE FUNCTION dbo.uf_TrimZero
(
@Numeric NUMERIC(18,7)
)
RETURNS VARCHAR(20)
AS
BEGIN
DECLARE @ResultStr VARCHAR(20)
SELECT @ResultStr=CAST(@Numeric AS VARCHAR(20))
WHILE RIGHT(@ResultStr,1)='0'
SELECT @ResultStr=LEFT(@ResultStr,LEN(@ResultStr)-1)
RETURN @ResultStr
END
--调用:
--SELECT dbo.uf_TrimZero(1.3020000)