The stored procedure scripts that SQL Server Management Studio 2005 generates for me are like:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[APY_SP_ACH_Transmit_Finish]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'
...
print ''arg!, all the quotes are escaped''
...
'
END
so all the quotes are escaped. is there a way or option to turn this off?
in SQL Server Management Studio 2005. I do the following:
1) In Object Explorer, locate the procedure I want to script out
2) right click, and select script stored procedure as “Create To”
3) selecting file or clipboard has the same effect.
This seems to happen when the scripting option
"Include If NOT EXISTS" clauseis on.Do you need this on? If not you can turn it off via the
Tools -> Options -> Scripting
From this Connect item it doesn’t look configurable without that.