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
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 7:57 AM
Points: 1,974, Visits: 2,920
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


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, July 23, 2014 2:28 PM
Points: 786, Visits: 691
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