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: Yesterday @ 10:00 AM
Points: 8,551, Visits: 9,043
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: Saturday, May 31, 2014 9:19 PM
Points: 1,128, Visits: 1,162
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: Yesterday @ 6:55 PM
Points: 21,204, Visits: 14,889
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: Thursday, July 10, 2014 9:45 AM
Points: 1,886, Visits: 784
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: Thursday, June 5, 2014 8:36 AM
Points: 926, Visits: 556
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: Sunday, July 20, 2014 11:20 PM
Points: 13,252, Visits: 10,133
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: Monday, July 21, 2014 6:24 AM
Points: 2,451, Visits: 2,342
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


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 12:21 AM
Points: 2,988, Visits: 900
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: Monday, July 21, 2014 8:35 AM
Points: 3,642, Visits: 72,429
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