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
Hard disk drive Iomega MDHD10T-U2 not running on Windows 7/XP?
Multiple update statement with foreign key constraints
Microsoft sql2005 patches
Login returns to login screen
Formatting CString for rich edit control.
Auto Populate an unbound textbox on an unbound form
Question on Query Grouping
System.Web.Caching.Cache Error - Object not set to an instance of an object???
Word 07 - How do I remove the margins completely so that a tilte spreads across an entire A4 page?
Accessing Program files in Vista?