Reputation: 1895
I would like to remove nulls from a vector
a:(2013.05.20 2013.05.21 2013.05.22 0N 0N 2013.05.23)
I can see how this can be done by creating a table using
temp:([] a);
result:exec a from temp where not null a;
but I am curious if there is a quicker way that doesn't involve creating a table.
Thanks
Upvotes: 1
Views: 4031
Reputation: 3229
Another way to get the non-null elements using except
:
q)a:(2013.05.20 2013.05.21 2013.05.22 0N 0N 2013.05.23)
q)a except 0N
2013.05.20 2013.05.21 2013.05.22 2013.05.23
Upvotes: 0