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 ««12

Implicit conversion using COALESCE or CASE Expand / Collapse
Author
Message
Posted Friday, July 5, 2013 1:30 PM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: 2 days ago @ 3:14 PM
Points: 2,098, Visits: 3,155
ISNULL() has its own oddities:


DECLARE @var1 char(1)
SET @var1 = NULL

SELECT ISNULL(@var1, 'N/A') -- Result = 'N'




SQL DBA,SQL Server MVP('07, '08, '09)

"We came in spastic, Like tameless horses /
We left in plastic, As numbered corpses / ...
Remember Charlie, Remember Baker /
They left their childhood On every acre /
And who was wrong? And who was right? /
It didn't matter in the thick of the fight." : the inimitable Mr. Billy Joel, about the Vietnam War
Post #1470865
Posted Friday, July 5, 2013 1:54 PM


SSC Eights!

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

Group: General Forum Members
Last Login: Yesterday @ 7:07 AM
Points: 803, Visits: 720
Yes, the data type for isnull is always the type of the first argument.

Erland Sommarskog, SQL Server MVP, www.sommarskog.se
Post #1470871
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse