views:

104

answers:

1

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

A: 

Can you please provide an example of the query that you have and the result that you get to better understand what you try to avoid?

JorgeLarre