|
Hi, I have been writing a query to get sum of few columns and I am not able to get the rows that has atleast one column with no zero. eg. ExpenseA ExpenseB ExpenseC $1000 $0 $0 $0 $200 $300 $0 $0 $0
and so on.
Now how do I get get only the first 2 rows not the third row since all the columns are zero. Here is how I have my query Select sum(ExpenseA), sum(ExpenseB), sum(ExpenseC) from tblExpenses where ExpenseA > 0 or ExpenseB > 0 or ExpenseC > 0 I am still getting all the rows. Is there some built in sql function that will do this?
Thank you.
|