Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get the value of QUOTED_IDENTIFIER

Status
Not open for further replies.

GeertVerhoeven

Technical User
Oct 7, 2001
142
BE
Hi,

I know that I can use the SET command to change the value of an identifier. But how can I retrieve the value of an identifier without changing it.

Thanks in advance,

Geert

Kind regards,

Geert Verhoeven
 
I'm not sure that you can query whether QUOTED_IDENTIFIER is on or off but my first question would be why do you need to do this?

--James
 
I'm currently studying for MCDBA exams. It was just a question to see if it is possible to look up the information in an identifier in general.

I have no specific purpose to use the identifier value.

Greetz,

Geert

Kind regards,

Geert Verhoeven
 
Quoted_Identifier is an on/off switch, it isn't a value you can select.

If you turn it on, it means you can name columns, tables or variables with SQL reserved keywords as long as you surround the value with " marks. If Q_I is on, and you want to see what a specific value is of an object that has such a name, you should be able to use a simple select statement, assuming that object is a variable or a column name, etc.

An example would be:

Select "identity" from #TempTable

Does this help?



Catadmin - MCDBA, MCSA
"If a person is Microsoft Certified, does that mean that Microsoft pays the bills for the funny white jackets that tie in the back???
 
Thanks for the info.

The thing I wondered is whether it is possible to retrieve the value of an identifier like QUOTED_IDENTIFIER without changing it.

For example to be able to lookup the status of specific identifier to make sure that the code you created can also run on different SQL Servers.

Greetz,

Geert
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top