I have a table that has a handful of cells with null values (scattered across the dataset). Any simple way of exluding all rows that have a null in any of its columns?
I'm just trying to avoid this...
select from T where not null col1, not null col2, not null col3, etc...
Either use simple list functions for easy to read code or functional form for speed. The functional form will be faster as it doesn't scan all the entire columns just those that pass each stage of the filter.
q)t:flip `a`b`c`d`e!flip {5?(x;0N)} each til 10
q)t
a b c d e
---------
0 0
1 1
2 2 2
3 3 3 3
4 4 4 4 4
5 5
6
7 7
8 8
9 9 9 9
// simple way
q)where all each not null t
,4
q)t where all each not null t
a b c d e
---------
4 4 4 4 4
// faster
q)?[t;{(not;(null;x))} each cols t; 0b; ()]
a b c d e
---------
4 4 4 4 4