SQL Server Management Studio 创建过程脚本时出现问题
SQL Server Management Studio 2005 为我生成的存储过程脚本如下:
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
因此所有引号都被转义。有没有办法或选项可以关闭它?
在 SQL Server Management Studio 2005 中。我执行以下操作:
1) 在对象资源管理器中,找到我想要编写脚本的过程
2)右键单击,选择脚本存储过程作为“创建到”
3)选择文件或剪贴板具有相同的效果。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当脚本选项“Ininclude If NOT EXISTS”子句启用时,似乎会发生这种情况。
你需要这个吗?如果没有,您可以通过“工具”->“将其关闭
”选项-> <
来自此连接项 /a> 如果没有它,它看起来就无法配置。
This seems to happen when the scripting option
"Include If NOT EXISTS" clause
is 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.