COALESCE FUNCTION??

Who is online?  0 guests and 0 members
Home  »  Forums   »  microsoft business intelligence   »  sql server   » COALESCE FUNCTION??

COALESCE FUNCTION??

Topic RSS Feed

Posts under the topic: COALESCE FUNCTION??

Posted: 11/25/2010

Jedi Youngling 8  points  Jedi Youngling
  • Joined on: 11/5/2010
  • Posts: 4

is there an updated approach on how to use the COALESCE keyword?

Or if there is a NEW keyword that will replace COALESCE on SQL 2005/2003?

thank you


Posted: 11/28/2010

Jedi Knight 1516  points  Jedi Knight
  • Joined on: 1/3/2010
  • Posts: 266

Hi reymon.

Coalesce function is available since SQL Server 2000 and returns the first nonnull expression among its N arguments.

Here is the syntax:

COALESCE(expression1 [,expression2,expression3,...expressionN ])

Think about this function as a CASE WHEN but much simplier.

Take a deep look at http://msdn.microsoft.com/en-us/library/aa258244(SQL.80).aspx


tags coalesce
Page 1 of 1 (2 items)