November 25, 2010 at 5:39 am
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
November 25, 2010 at 5:44 am
No and no. Coalesce has not been replaced, there's no new keyword for it. It's still there and usable in SQL 2005/2008
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 25, 2010 at 6:12 am
what i mean is that , are ther other new functions or function that works just like the use of a coalesce?
November 25, 2010 at 6:22 am
maybe we would be able to better assist you if you told us why. What are you trying do? COALESCE does what it says and does it well. Improper use of the COALESCE statement in a WHERE statement for example has negative "side-effects".
November 25, 2010 at 6:40 am
reymon26 (11/25/2010)
what i mean is that , are ther other new functions or function that works just like the use of a coalesce?
Why? What are you trying to do?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 25, 2010 at 6:57 am
isNull is similar, but what is your issue with coalesce ?
November 26, 2010 at 12:55 pm
This sounds a lot like a homework / test question
November 26, 2010 at 7:58 pm
Nevyn (11/26/2010)
This sounds a lot like a homework / test question
Or an interview question.
I have to say that it's a bit of a trick question and that most people would probably pick ISNULL as the answer. But ISNULL only takes two operands where COALESCE takes 2 OR MORE operands. That would make ISNULL the wrong choice. Most folks can easily figure out what the correct answer is on their own and just in case this is homework or and interview question, I'll leave it up to the OP to discover it... 😛 Especially since I just gave the answer. :hehe:
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply