Its pretty easy to forget some of the cool SQL functions that are built into SQL server. I've been driving myself crazy adding in a custom function that would take a varchar variable and convert it to an empty string if it was null. I totally forget about the lovely IsNull function. What functions have you forgotten about before either because you haven't used it in awhile or were caught up in doing something and you couldn't remember or think clearly?
I have to admit coding in ASP with SQL Server 2000 sure seemed easier to keep in my coconut than coding in ASP.NET with SQL Server 2005 is, but then I'm 45 now so my coconut is also to blame.
COALESCE is simply a million times better than ISNULL. It's almost unheard of among my colleagues but it's one I use all the time.
NULLIF is another great one and used in conjunction with ISNULL can be very handy!
Yip, that COALESCE function is a ringer. Thats the first one I thought of to post about.
Jason, just because of this post I decided to write a little blog post titled "Ten SQL Server Functions That You Hardly Use But Should"
This post explains the use of the following functions
and the URL is here: http://sqlservercode.blogspot.com/2007/02/ten-sql-server-functions-that-you.html