如何删除“将varchar转换为数值类型数字的算术溢出错误”。在下面查询

时间:2019-04-03 08:56:50

标签: sql-server

我在执行此问题时遇到异常,其中[DeviceName]是我想要该列的值的子字符串,直到DOT(。)。

这是我的查询:

select [DeviceName] as DeviceName, 
       Round(Sum(CAST([SentThroughput_MBpA] as decimal)),3) as TotalSentThroughput, 
       Round(Sum(CAST([ReceivedThroughput_MBpA] as decimal)),3) as TotalReceivedThroughput 
from[dbo].[DeviceUtilization]
where substring( [DeviceName],0,CHARINDEX('.',[DeviceName])) = 'BESWEB4' group by[DeviceName]

0 个答案:

没有答案