Sum all row exclude the negative numbers in Oracle Reports Sum all row exclude the negative numbers in Oracle Reports oracle oracle

Sum all row exclude the negative numbers in Oracle Reports


With your specifications,

Select sum(col) from table where col>0;


You can do something like

SELECT SUM( case when column_name > 0                  then column_name                 else 0              end ) sum_of_non_negative  FROM table_name


Select sum(col) from table where col>0AND   col not like '-%';