将数值转换为数值类型的算术溢出错误
每当我运行此查询时,我都会不断收到此错误消息: Msg 8115, Level 16, State 8, Line 33 Arithmetic overflow error converting numeric to data type numeric. The statement has been terminated. 但是,如果我将创建表更改为(7,0),则不会收到错误消息,但是我需要将数据显示为小数。我试过8,3不起作用。 有谁能帮助我完成这项工作?任何帮助将不胜感激。 DECLARE @StartDate AS DATETIME DECLARE @StartDate_y AS DATETIME DECLARE @EndDate AS DATETIME DECLARE @temp_y AS DATETIME SET @temp_y = Dateadd(yy, Datediff(yy, 0, Getdate()), 0) SET …