SQL count NULL cells
Posted
by Giuseppe
on Stack Overflow
See other posts from Stack Overflow
or by Giuseppe
Published on 2010-04-22T07:59:55Z
Indexed on
2010/04/22
8:03 UTC
Read the original article
Hit count: 342
Dear All,
I have the following problem. I have a table in a db, with many columns. I can do different kind of select queries, to show, for example, for each record that satisfies a condition:
- all cells from columns with names ending in _t0
- all cells from columns with names ending in _t1
- ...
To get the column lists to form the queries I use the information schema.
Now, the problem: each query returns a record with a subset of the columns of the big table. This means that I can get a row of (all!) NULLs. How can I ask my query to reject such rows without having to type in explicitely the column names (i.e. by saying where col_1 is not null, col_2 is not null...)? Is it possible?
Thanks in advance!!!
Sep
© Stack Overflow or respective owner