Please start any new threads on our new
site at http://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Our new SQL Server Forums are live!
Come on over! We've restricted the ability to create new threads on these forums.
Posting Yak Master
Flowing Fount of Yak Knowledge
col1=0 AND col2=0 AND col3=0 AND col4=0;
-- eliminate if all are nulls
COALESCE(col1,col2,col3,col4) IS NOT NULL;
-- eliminate if it is a combination of nulls and zeros
COALESCE(NULLIF(col1,0),NULLIF(col2,0),NULLIF(col3,0),NULLIF(col4,0)) IS NOT NULL;