SQL Clone
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

Archives: February 2010

Tally Table - Delimited list to Table

Dealing with delimited lists (Usually separated by a comma) in SQL is a problem easily handled by a simple function and a Tally Table.  (Tally tables are also often referred to as Numbers tables or spt_values tables.  If you still don't know what that is, please see this excellent article Read more

3 comments, 3,500 reads

Posted in Never Say Never on 27 February 2010

Data Type Precedence and Implicit Conversions

In my last post, I noted that one of the biggest differences between ISNULL and COALESCE was the fact that ISNULL attempted to convert the second parameter to the data type of the first parameter where as COALESCE converted according to the Data Type Precedence table.  A reader requested… Read more

2 comments, 4,063 reads

Posted in Never Say Never on 21 February 2010


There are a lot of arguments about which of these to use.  In my opinion, they both have their place.  Here are a few facts about the two functions.

  • ISNULL can accept only two arguments where as COALESCE can accept any number of input parameters
  • ISNULL is not ANSI standard…

Read more

6 comments, 8,765 reads

Posted in Never Say Never on 11 February 2010