GIStewart
asked on
Query to exclude records with null values across multiple fields
I am sure this is easy for everyone but me!
I have a table with 4 fields, and each record can have between zero and 4 values across these fields. I am looking for a query that includes any record with at least 1 value across these fields, and excludes any with none. For example, in the attached sample file, records 4, 7 and 9 would not be displayed in the query, but the rest would be.
EE-sample-Apr29.mdb
I have a table with 4 fields, and each record can have between zero and 4 values across these fields. I am looking for a query that includes any record with at least 1 value across these fields, and excludes any with none. For example, in the attached sample file, records 4, 7 and 9 would not be displayed in the query, but the rest would be.
EE-sample-Apr29.mdb
ASKER
I renamed my columns col1, col2, col3, col4, and then used the following code in a query:
SELECT * from Table1 where (Col1 is not null or Col2 is not null or Col3 is not null or Col 4 is not null);
but i get a syntax error (missing operator) message.
SELECT * from Table1 where (Col1 is not null or Col2 is not null or Col3 is not null or Col 4 is not null);
but i get a syntax error (missing operator) message.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you.
Or select * where (col1 is not null or col2 is not null or col3 is not null or col 4 is not null)