I have a table and I would like to write query that shows lines which have all columns to '0' but one .
T_CELKO_TEN_IN_ON_TIO(TIO_ID,TIO_1,TIO_2,TIO_3,TIO_4,TIO_5,TIO_6,TIO_7,TIO_8,TIO_9,TIO_10); 
I have numbers in it
for example if I have:
1(id)        0        1        1        0        0        0        0        0        0        0
2(id)        0        0        0        0        0        0        0        1        0        0
3(id)        0        1        -2       3        -4       5        -6       7        -8       5
So the query should prints:
2(id)        0        0        0        0        0        0        0        1        0        0
I have wrote this query:
Select * from T_CELKO_TEN_IN_ON_TIO where SUM  (CASE WHEN  TIO_1='0' THEN 1 ELSE 0 END OR
                                               TIO_2='0' THEN 1 ELSE 0 END OR
                                               TIO_3='0' THEN 1 ELSE 0 END OR
                                               TIO_4='0' THEN 1 ELSE 0 END OR
                                               TIO_5='0' THEN 1 ELSE 0 END OR
                                               TIO_6='0' THEN 1 ELSE 0 END OR
                                               TIO_7='0' THEN 1 ELSE 0 END OR
                                               TIO_8='0' THEN 1 ELSE 0 END OR
                                               TIO_9='0' THEN 1 ELSE 0 END OR 
                                               TIO_10='0' THEN 1 ELSE 0 END)=9;
I get an error: An expression of non-boolean type specified in a context where a condition is expected, near 'OR' but I think even the my query does not work.
 
     
     
    