我在执行此问题时遇到异常,其中[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]