I forgot to mention this table has a primary key which is not null for sure. I don't want to do something like column1 is not null and column2 is not null .... columnN is not null.
I think i can do this:
do an unpivot by the primary key to create a virtual table having two columns (id, value), create a temp table.
create table #temp (id)
select into #temp(id)
select id
from unpivot_table
group by column_id having sum(isnull(column_value,0))=0
if this is OK, i will delete any rows having the id in #temp.
I am not familiar with unpivot so I am going over it. Will update this post soon.
I think i can do this:
do an unpivot by the primary key to create a virtual table having two columns (id, value), create a temp table.
create table #temp (id)
select into #temp(id)
select id
from unpivot_table
group by column_id having sum(isnull(column_value,0))=0
if this is OK, i will delete any rows having the id in #temp.
I am not familiar with unpivot so I am going over it. Will update this post soon.