代码改变世界

XQuery使用sum求和,提示char不能转换为money解决方法

2017-02-04 17:56  slmk  阅读(580)  评论(0编辑  收藏  举报
select axml.value('sum(/root/pro/price)','money')

以上代码提示‘char不能转换为money’的错误,发现值为'0.0E0'。改为:

select axml.value('sum(/root/pro/price)','float')

问题解决。

why?