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
Calander pop up control in tables
SSIS DYNamic excel connection string in runtime
Keeping Look Ups in a Make Tabel Query
filtiring HTTPS Traffic in ISA Server 2006
XBOX Classic power and eject buttons don't work
Shutdown VM in ESXi 4.0 when connected to a smart ups 1000
How Can I Detect, Delete, and Add A Printer In Windows XP using Visual Basic, C#, or C++
VPN Connection Problem
ASP.Net page slow to load large dropdown list
Where does XPS driver print or save the file to and what extention