Query returning all none nulls 
Author Message
 Query returning all none nulls
I am looking to write a query that returns all info in a table that is not
null. There are 25 columns.
select * from tablename       returns all data regardless if  it is null or
not
How should I write the query?
Thank you


Sat, 21 Sep 2002 03:00:00 GMT
 Query returning all none nulls

Nathan,

It is not exactly clear from your post just what you are requesting.

It sounds like you have a table with 25 columns, and want to return all rows for
which none of the columns has a NULL value.

If that's it, then ...

select *
from <tablename>
where <col1> IS NOT NULL
and    <col2> IS NOT NULL
...
and   <col25> IS NOT NULL

If I have misinterpreted your post, perhaps you could clarify what you need.


Quote:
> I am looking to write a query that returns all info in a table that is not
> null. There are 25 columns.
> select * from tablename       returns all data regardless if  it is null or
> not
> How should I write the query?
> Thank you



Sat, 21 Sep 2002 03:00:00 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. Concat null yields null always returns null in 70 mode

2. Query via MSSQL Linkedserver to UNIX LDAP Server returning nothing but NULLs

3. Help: Query based on date which returns also NULL values

4. Query via MSSQL Linkedserver to UNIX LDAP Server returning nothing but NULLs

5. Query returning null value

6. Aliases in a query - returning a null

7. SQL Query returning null

8. Recordset Continues to return Null when Query Works in Access 97

9. ADO returning a NULL from query, but works in DAO

10. Returning a NULL value from a query in Access

11. Query on LDAP returns NULL values

12. Having NULL make SUM return a NULL?


 
Powered by phpBB® Forum Software