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 07, 2013 9:07 PM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Today @ 7:47 AM
Points: 8,296, Visits: 8,750
Comments posted to this topic are about the item Coalesce and Conversion

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

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, April 09, 2014 9:03 PM
Points: 1,128, Visits: 1,161
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 07, 2013 10:07 PM


SSC-Insane

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

Group: General Forum Members
Last Login: Today @ 4:39 PM
Points: 20,485, Visits: 14,143
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 07, 2013 10:34 PM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Wednesday, November 20, 2013 4:08 AM
Points: 1,849, Visits: 775
Nice Question. Learnt something for today.

Regards,
Rals
.
Post #1403968
Posted Tuesday, January 08, 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: Wednesday, April 16, 2014 5:16 AM
Points: 905, Visits: 553
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 08, 2013 12:31 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 3:31 PM
Points: 12,239, Visits: 9,212
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 08, 2013 1:39 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 1:39 AM
Points: 2,397, Visits: 2,287
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 08, 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: Wednesday, April 09, 2014 10:34 AM
Points: 701, Visits: 1,140
Thanks for the great question! A true learning question with no controversy.
Post #1404123
Posted Tuesday, January 08, 2013 4:57 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: 2 days ago @ 7:15 AM
Points: 2,927, Visits: 878
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 08, 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: Tuesday, April 15, 2014 12:05 PM
Points: 3,569, Visits: 72,411
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