NullDisplayText in markup vs ISNULL(field, 0) in SQL?

Posted by abatishchev on Stack Overflow See other posts from Stack Overflow or by abatishchev
Published on 2010-05-16T20:17:41Z Indexed on 2010/05/16 20:30 UTC
Read the original article Hit count: 126

Filed under:
|
|
|
|

Which approach is better to use:

  • BoundField.NullDisplayText isn't set. NULL-case is foreseen in SQL query, i.e. SELECT ISNULL(amount, 0) FROM table

or

  • BoundField.NullDisplayText is set, e.g. "0.00 %". NULL-case isn't foreseen in SQL query, i.e. SELECT amount FROM table

What do you think?

© Stack Overflow or respective owner

Related posts about sql

Related posts about null