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


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 4:53 PM
Points: 7,182, Visits: 7,281
Comments posted to this topic are about the item Coalesce and Conversion

Tom
Is minic a gheibheann béal oscailte dorn dúnta.
Is minig a cheapas beul fosgailte dòrn dùinte.

http://es.linkedin.com/in/tomthomsonsoftware
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: Today @ 3:31 AM
Points: 1,088, Visits: 1,118
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


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Today @ 5:03 PM
Points: 18,853, Visits: 12,438
Thanks for the question.



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


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: Thursday, June 13, 2013 8:02 AM
Points: 1,732, Visits: 757
Nice Question. Learnt something for today.

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


Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Wednesday, May 29, 2013 10:36 PM
Points: 773, Visits: 464
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


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Today @ 6:30 AM
Points: 9,410, Visits: 6,495
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


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 1:43 AM
Points: 1,992, Visits: 1,855
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: Yesterday @ 6:18 AM
Points: 691, Visits: 1,104
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: Tuesday, June 11, 2013 4:35 AM
Points: 2,673, Visits: 729
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: Today @ 10:09 PM
Points: 3,250, Visits: 65,527
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