On Mon, Feb 22, 2010 at 5:03 PM, Wade Preston Shearer <[email protected]> wrote: >>You can also use a slick function called coalesce which most db >>engines support. > > I looked coalesce up and don't see how would work in this case. Will you > provide an example?
You didn't provide a specific query to compare with so hard to say exactly how you would use it in your case. A few years back I ran into the oddities of null checking in DBs - http://joseph.randomnetworks.com/archives/2006/03/15/nvl-isnull-ifnull-and-coalesce/ And just to make it even more interesting, MySQL has IS_NULL - http://dev.mysql.com/doc/refman/5.0/en/comparison-operators.html#operator_is-null - and ISNULL - http://dev.mysql.com/doc/refman/5.0/en/comparison-operators.html#function_isnull which could make for one tongue twister of a query :-) COALESCE could be thought of as more generalized null check - http://dev.mysql.com/doc/refman/5.0/en/comparison-operators.html#function_coalesce -- Joseph Scott [email protected] http://josephscott.org/ _______________________________________________ UPHPU mailing list [email protected] http://uphpu.org/mailman/listinfo/uphpu IRC: #uphpu on irc.freenode.net
