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
Controlling order of columns in cross tab report
Excel opens to a gray screen on first launch
VB.net properties window not showing events
Web Service or WCF? Current system uses thumb drives.
User-Level Security
Mounting Images using IMAGEX
Unable to change the size of the page file
How to use DELETE command in SQL SERVER 2005
Access Report export question: DoCmd.OutputTo can't export Excel 1997-2003 format?
.Net C# Getting the error: The remote server returned an error: (401) Unauthorized. when using OWA Outlook Web Access