开发者

Calculating the sum of varchar2 data fields in Oracle 10g

开发者 https://www.devze.com 2023-01-18 14:18 出处:网络
How to use the sum function of SQL to calculate sum of var开发者_如何转开发char field. I\'m looking for a solution where we cannot use count.If the varchar field contains strings that can be interpret

How to use the sum function of SQL to calculate sum of var开发者_如何转开发char field. I'm looking for a solution where we cannot use count.


If the varchar field contains strings that can be interpreted as numbers:

select sum(to_number(the_column)) from the_table

If not, I do not understand the question.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号