I need to find rows in resultsets that have every column without null.
these resultsets got variable number of columns.
currently, the only way that I can think of is creating a view on each resultset and filter this way:
select field1, field2, field3, field4, ...
from "huge query"
where field1 is not null and
field2 is not null and
field3 is not null and
field4 is not null and
... is not null
is there a better way to do this in a storeproc/function in sql server or in .net code (c# or vb.net) ?
and what about doing something like
select field1, field2, field3, field4, ...
from "huge query"
(return to .net apps or insert into #temptable)
and then in a storeproc/function or .net code(c# / vb.net) loop through all rows / columns and flag or remove every row that got any null?
I'm talking about easily over 50 different kind of resultsets and it might grow over time, so i'm looking for a generic / easily maintainable way