converting NULL to 0 
Author Message
 converting NULL to 0

I'm connecting to a Jet database (via ADO).  How do I write a SELECT
statement, such that if a numeric column is NULL, it returns 0.

For example:

SELECT MAX(value) FROM ATable

If MAX(value) evaluates to NULL, I want a 0 to be returned instead.  In
Access, you can use the NZ() function.  But when I try to use that (SELECT
NZ(MAX(value)) FROM ATable) NZ is not a recognized function.

TIA



Fri, 30 Aug 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Converting null pointer to int

2. Q: Converting char[] with null bytes to BSTR ?

3. A + is converted to null ????

4. converting hex to ascii - nulls problematic

5. Error nvarchar with spaces converting to NULL by CRECORDSET (VC6 to VC7)

6. NULL v null pointer constant

7. Global pointer is null sometimes even when initialized to some non-null value

8. NULL as a null function pointer

9. confused null pointer with null pointer constant

10. memcpy( NULL, NULL 0 ) - safe or not?

11. NULL isn't 0/0 isn't NULL

12. MFC ODBC NULL/NOT NULL

 

 
Powered by phpBB® Forum Software