![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Also, is there info on what the default value of this variable is? |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
You can also check the status of this option in your database using DATABASEPROPERTYEX: SELECT DATABASEPROPERTYEX('MyDatabase', 'IsNullConcat') |
|
But since the connection level settings can override the default database setting, using SESSIONPROPERTY('CONCAT_NULL_YIELDS_NULL') will give you the value for the current session. |
#5
| |||
| |||
|
|
Plamen Ratchev (Plamen (AT) SQLStudio (DOT) com) writes: You can also check the status of this option in your database using DATABASEPROPERTYEX: SELECT DATABASEPROPERTYEX('MyDatabase', 'IsNullConcat') But that setting applies only to clients that uses a legacy API. That is, by setting this setting ON, you can force a client that connects with DB-Library to have CONACT_NULL_YIELDS_NULL on. Another way to do this is the server-level configuration option 'user options'. If you connect with a modern API, you will have CONCAT_NULL_YIELDS_NULL on even if the database setting is off. |
|
But since the connection level settings can override the default database setting, using SESSIONPROPERTY('CONCAT_NULL_YIELDS_NULL') will give you the value for the current session. Yes, that is the one to check. The same applies to other ANSI settings. Except that for ANSI_NULL and QUOTED_IDENTIFIER, the setting is saved with the stored procedure. Very, very confusing. |
|
-- Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se Books Online for SQL Server 2005 at http://www.microsoft.com/technet/pro...ads/books.mspx Books Online for SQL Server 2000 at http://www.microsoft.com/sql/prodinf...ons/books.mspx |
#6
| |||
| |||
|
|
The same applies to other ANSI settings. Except that for ANSI_NULL and QUOTED_IDENTIFIER, the setting is saved with the stored procedure. Very, very confusing. Couldn't agree more. I haven't had a chance to look up those in SQL Server 2008. Any chance it will get better? |
#7
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |