Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> newbie-SQL Count
I have a table, there are more columns than this.
I used this to keep it simple.
ColA ColB Quantity 30 24 2 30 0 1
I want to do
UPDATE myTable SET Quantity= (SUM(Decode(ColA,NULL,0,0,0,1) +Decode(ColB,NULL,0,0,0,1) )
I get an error message of :
group function is not allowed here
How can I count each Column that has a POSITIVE number and put the sum in QUANTITY?
TIA
Steve
Received on Mon Mar 26 2007 - 16:53:05 CDT