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: Yesterday @ 1:40 PM
Points: 2,214, Visits: 3,335
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)

Carl Sagan said: "There is no such thing as a dumb question." Sagan obviously never watched a congressional hearing!
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: Today @ 7:00 AM
Points: 809, Visits: 727
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