Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
pvccaz
Yak Posting Veteran
87 Posts |
Posted - 2011-04-04 : 00:49:22
|
| Hi,Is there a way to SET ANSI NULLS OFF for specific objects in a database. For example, i want to set the ANSI NULLS OFF for all the table valued functions in a db. Is there a simple way of doing it ?. Currently i have to run scripts for each and every function individually.Thanks, |
|
|
jcelko
Esteemed SQL Purist
547 Posts |
Posted - 2011-04-04 : 12:56:25
|
| This is a truly awful idea. Why no learn to write real SQL and not try to create your own DB language on the fly?--CELKO--Books in Celko Series for Morgan-Kaufmann PublishingAnalytics and OLAP in SQLData and Databases: Concepts in Practice Data, Measurements and Standards in SQLSQL for SmartiesSQL Programming Style SQL Puzzles and Answers Thinking in SetsTrees and Hierarchies in SQL |
 |
|
|
pvccaz
Yak Posting Veteran
87 Posts |
Posted - 2011-04-04 : 14:52:46
|
| There were some functions that were migrated from SQL 2005 to SS 2008. In Sql2005 they had ANSI NULLS OFF, but when they were migrated to SQL 2008 somehow they were SET TO ON. So i have to set it OFF again. |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2011-04-04 : 14:58:46
|
| Best suggestion I can think of is to generate the scripts for the objects (to clipboard or new query window) and then so a find/replace from "SET ANSI_NULLS ON" to "SET ANSI_NULLS OFF". If you right-click the database in Management Studio and choose Tasks|Generate Scripts... you can figure it out from there. |
 |
|
|
pvccaz
Yak Posting Veteran
87 Posts |
Posted - 2011-04-04 : 16:50:44
|
| Thank you very much for the suggestion ! |
 |
|
|
|
|
|