[英]Converting varchar to data type numeric
I have a stored procedure spGetMetricValues
in a sql file. 我在SQL文件中有一个存储过程
spGetMetricValues
。 To execute it I have another file has the following: 要执行它,我有另一个文件,其内容如下:
ALTER PROCEDURE [dbo].[spGetMetricValues]
EXECQSG.dbo.EXCEL_FUNC
@asofdate date,
@startdate date,
@coupon_type varchar(25),
@security_term varchar(25),
@metric_type varchar(25),
@whose_holding varchar(25),
@accretion_type varchar(25),
@decomp_method varchar(25)
DECLARE @output decimal(28,10)
SELECT @output = @query --@query is defined in the SP as varchar(1000)
RETURN (ISNULL(@output,0))
END
When I execute, I get an error 执行时出现错误
Arithmetic Overflow Error Converting varchar to data numeric
算术溢出错误将varchar转换为数据数值
Can someone please tell what should I do to resolve the problem? 有人可以告诉我该怎么做才能解决问题?
返回将只接受整数dataType
RETURN [int]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.