Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 123»»»

Coalesce and Conversion Expand / Collapse
Author
Message
Posted Monday, January 7, 2013 9:07 PM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Today @ 6:40 PM
Points: 8,743, Visits: 9,292
Comments posted to this topic are about the item Coalesce and Conversion

Tom
Post #1403953
Posted Monday, January 7, 2013 9:12 PM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, July 31, 2014 7:15 PM
Points: 1,129, Visits: 1,163
I missed it completely
. no regret , learned something .

Also, I am glad to see that on aswering the question, equation for right and wrong is 0% and 100 %

Thanks for the question ..


~ demonfox
___________________________________________________________________
Wondering what I would do next , when I am done with this one
Post #1403955
Posted Monday, January 7, 2013 10:07 PM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Friday, August 29, 2014 1:51 PM
Points: 21,644, Visits: 15,317
Thanks for the question.



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #1403963
Posted Monday, January 7, 2013 10:34 PM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Friday, August 22, 2014 10:32 AM
Points: 1,892, Visits: 791
Nice Question. Learnt something for today.

Regards,
Rals
.
Post #1403968
Posted Tuesday, January 8, 2013 12:13 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Monday, August 4, 2014 5:38 AM
Points: 945, Visits: 558
still now i thought COALESCE will return the datatype of Non NUll value. Today only i learnt it will consider the highest percedence..

Thanks to author for posting nice qstn..


--
Dineshbabu
Desire to learn new things..
Post #1403992
Posted Tuesday, January 8, 2013 12:31 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: 2 days ago @ 11:26 AM
Points: 13,622, Visits: 10,514
Great and very interesting question. Thanks Tom!



How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1403998
Posted Tuesday, January 8, 2013 1:39 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 1:23 AM
Points: 2,509, Visits: 2,386
I prefer ISNULL, the cast is done to the first argument.
I use it e.g. with numeric type ISNULL(int_null,0). But, I should remember that with string ISNULL may be dangerous as in this case:
declare @c varchar(1)
select ISNULL(@c,'N/D')
Result:
N
instead of N/D
Post #1404046
Posted Tuesday, January 8, 2013 4:12 AM


Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Thursday, June 12, 2014 4:19 AM
Points: 701, Visits: 1,145
Thanks for the great question! A true learning question with no controversy.
Post #1404123
Posted Tuesday, January 8, 2013 4:57 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Thursday, August 28, 2014 6:00 AM
Points: 3,022, Visits: 912
Well, the question is a good one, and I got it right, but if I see code like that I reach for the shot gun.


Just because you're right doesn't mean everybody else is wrong.
Post #1404161
Posted Tuesday, January 8, 2013 6:55 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Friday, August 22, 2014 7:04 AM
Points: 3,675, Visits: 72,433
Koen Verbeeck (1/8/2013)
Great and very interesting question. Thanks Tom!


+1 I must agree... was a lot of fun to sit there pondering if all of the various data types would be compatible with each other. Now where did I put that Ibuprofen? heh




--Mark Tassin
MCITP - SQL Server DBA
Proud member of the Anti-RBAR alliance.
For help with Performance click this link
For tips on how to post your problems
Post #1404217
« Prev Topic | Next Topic »

Add to briefcase 123»»»

Permissions Expand / Collapse