Solved

Is QUOTED_IDENTIFIER a database wide setting?

Posted on 2008-10-08
2
427 Views
Last Modified: 2008-10-16
Hello Experts. I noticed that I have to set QUOTED_IDENTIFIER=ON in my stored procedure in order to query from an XML datatype (to get the elements out). Is this QUOTED_IDENTIFIER a setting at the sproc level? That is, if I set QUOTED_IDENTIFIER=ON in one sproc, will it turn it on in the other sprocs within the same database? (I only want this setting in my sproc only and no others) Sorry for the dumb question!
0
Comment
Question by:trpnbillie
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 35

Accepted Solution

by:
David Todd earned 125 total points
ID: 22675429
Hi,

SET QUOTED_IDENTIFIER is set at parse time. Setting at parse time means that if the SET statement is present in the batch or stored procedure, it takes effect, regardless of whether code execution actually reaches that point; and the SET statement takes effect before any statements are executed.

from ... http://technet.microsoft.com/en-us/library/aa259228(SQL.80).aspx

or
When executed inside a stored procedure, the setting of SET QUOTED_IDENTIFIER is not changed.

from
http://technet.microsoft.com/en-us/library/ms174393(SQL.90).aspx

HTH
  David
0
 

Author Comment

by:trpnbillie
ID: 22687915
Thanks for your response! I think this

When executed inside a stored procedure, the setting of SET QUOTED_IDENTIFIER is not changed.

answers my question.

If at the top of my stored procedure "ProcA"  e.g.

SET QUOTED_IDENTIFIER = ON
GO
CREATE ProcA

That ON setting will not be enforced when other sprocs (ProcB, ProcC, ProcD) are executed? (unless they too have SET QUOTED_IDENTIFIER = ON). Is that right? THank you!!
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

So every once in a while at work I am asked to export data from one table and insert it into another on a different server.  I hate doing this.  There's so many different tables and data types.  Some column data needs quoted and some doesn't.  What …
INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question