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

Concatenating Strings to NULL values Expand / Collapse
Author
Message
Posted Sunday, January 31, 2010 4:36 PM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Monday, February 11, 2013 8:27 AM
Points: 1,646, Visits: 1,947
Comments posted to this topic are about the item Concatenating Strings to NULL values


Bru Medishetty

Blog -- LearnSQLWithBru

Join on Facebook Page Facebook.com\LearnSQLWithBru

Twitter -- BruMedishetty
Post #856878
Posted Monday, February 1, 2010 7:54 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Monday, February 11, 2013 8:27 AM
Points: 1,646, Visits: 1,947
Interestingly, I found the database option "concat null yields null" when set to either True or False, it yields null values only.. unless SET CONCAT_NULL_YIELDS_NULL ON is specified..

I could not upload in the comments section, so find them here..

Test script with the option turned ON



Test script with the option turned OFF






Bru Medishetty

Blog -- LearnSQLWithBru

Join on Facebook Page Facebook.com\LearnSQLWithBru

Twitter -- BruMedishetty
Post #857200
Posted Tuesday, February 16, 2010 8:45 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Sunday, October 19, 2014 11:12 AM
Points: 7,791, Visits: 9,545
I think that what is going on here is that the properties of the connection are over-riding the DB option - the connection supporting a QA or SMSS query window always has concat null yields null ON for the connection until it is overridden by a SET statement. The db option is only relevant for connections where concat null yields null is not set for the connection, so it is not relevant to QA or SMSS query windows.

Tom
Post #866158
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse