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: Today @ 12:13 AM
Points: 2,044, Visits: 3,060
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)
"In America, every man is innocent until proven broke!" Brant Parker
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: Thursday, August 21, 2014 3:04 PM
Points: 801, Visits: 715
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