2010-04-14 55 views
0

尝试使用:SQLCMD模式 - 语法不正确?

:On Error exit 

:r D:\opt\db_objects\REPORTS\dbo.sp_ReportCountLORUsers.sql 

...我得到:

消息102,级别15,状态1,行5 附近有语法错误 'U'。 **执行批次时遇到错误。退出。

我错过了什么?

回答

2

也许dbo.sp_ReportCountLORUsers.sql中的语法错误?

+0

在我的耻辱中,是的 - 复制/粘贴到Management Studio时,sproc本身不会运行。 – 2010-04-15 15:45:13

+0

更新:我无法在SQLCMD模式下运行多个':r'语句 – 2010-04-15 17:23:59

+0

在每个后面添加一个GO:r – 2010-04-15 17:25:29