nord Yak Posting Veteran
66 Posts
James K Flowing Fount of Yak Knowledge
1499 Posts
WHERE col1=0 AND col2=0 AND col3=0 AND col4=0;
-- eliminate if all are nulls WHERE COALESCE(col1,col2,col3,col4) IS NOT NULL; -- eliminate if it is a combination of nulls and zeros WHERE COALESCE(NULLIF(col1,0),NULLIF(col2,0),NULLIF(col3,0),NULLIF(col4,0)) IS NOT NULL;