简单统计为何不行???
用的是:select sum(cast(colA as decimal(10,2))) from table
colA 是 nvarchar 类型
[解决办法]
--执行以下看看不没有非数字的数据
select * from table
where isnumeric(colA)=0
[解决办法]
检查
select * from table where isnumeric(cola)=0 是否存在记录
发布时间: 2012-04-11 17:42:33 作者: rapoo
简单统计为何不行???
用的是:select sum(cast(colA as decimal(10,2))) from table
colA 是 nvarchar 类型
[解决办法]
--执行以下看看不没有非数字的数据
select * from table
where isnumeric(colA)=0
[解决办法]
检查
select * from table where isnumeric(cola)=0 是否存在记录