Xpode.com        Click here to Print this article.

Allow double quotes in Store procedures

To allow double quotes in store procedures, Below line need to put above the procedure.

SET QUOTED_IDENTIFIER Off
When SET QUOTED_IDENTIFIER is ON, identifiers can be delimited by double quotation marks, and literals must be delimited by single quotation marks. When SET QUOTED_IDENTIFIER is OFF, identifiers cannot be quoted and must follow all Transact-SQL rules for identifiers. By default It is On.

It may give error like Create or alter statement should be first statement

To remove this error, write go before Create or alter. Example shown below:
SET QUOTED_IDENTIFIER Off
go
CREATE PROCEDURE spMyProc
(
-- definition
)


http://
http://

Contributed by:
Rohit kakria
I am software developer

Resourse address on xpode.com
http://www.xpode.com/Print.aspx?Articleid=590

Click here to go on website