Microsoft
Software
Hardware
Network
Question : Select MAX(ISNULL(variable, 0)) is returning NULL when it should be returning 0
I am trying to select a value before I do an insert.
In the table, I am trying to grab the next available ID, but, it is returning NULL. I am trying to do this:
SELECT MAX(ISNULL(fedexid, 0)) FROM fedex
Since there are no records in the FedEx table, this is returning as NULL. How do I get the above statement to return 0 if it is NULL.
Answer : Select MAX(ISNULL(variable, 0)) is returning NULL when it should be returning 0
try
SELECT ISNULL(MAX(fedexid),0) FROM fedex
Random Solutions
remove trailing comma from list
SQL Join Group and SUM
Write Confilcts on Unbound Form using DAO Recordset
Treeview to XML code - not getting sub nodes correctly
SMTP e-mailing queries
How can I remove NTFS writing permission to everyone
Convert .htaccess to web.config
Hide Page
How to save Excel 2007 spreadsheets into a form readable by Lotus 123
IIS 7