You can use the ISNULL function in the original T-SQL query by changing this query:
SELECT ID, Name, DivisionNotes FROM tblWHATEVER
to
SELECT ID, Name, ISNULL(DivisionNotes, 'No notes') AS
DivisionNotes FROM tblWHATEVER
I'm not saying that this is better than checking for zero in the code, but sometimes a simple change in the request can save you from changing the code in a bunch of different places.
source
share