上传mssql2005存储过程报错

aelfintiger 2013-07-19 01:38:57
There was an error importing the database. The status of the import is unknown.

'×' 附近有语法错误。

在本机存储过程脚本可以使用,上传到数据库服务器报上面的错误
...全文
102 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
唐诗三百首 2013-07-19
  • 打赏
  • 举报
回复
数据库服务器该不会是SQL2000吧?
aelfintiger 2013-07-19
  • 打赏
  • 举报
回复
SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sp_page]') AND type in (N'P', N'PC')) BEGIN EXEC dbo.sp_executesql @statement = N' CREATE procedure [dbo].[sp_page] @sqlstr nvarchar(4000), --查询字符串 @currentpage int, --第N页 @pagesize int --每页行数 as set nocount on declare @P1 int, --P1是游标的id @rowcount int exec sp_cursoropen @P1 output,@sqlstr,@scrollopt=1,@ccopt=1,@rowcount=@rowcount output select @rowcount as 总行数--, ceiling(1.0*@rowcount/@pagesize) as 总页数,@currentpage as 当前页 set @currentpage=(@currentpage-1)*@pagesize+1 exec sp_cursorfetch @P1,16,@currentpage,@pagesize exec sp_cursorclose @P1 set nocount off --exec [sp_page]''select * from shopinfo inner join userinfo on userinfo.username = shopinfo.username where userinfo.user_type=''''企业'''' order by userinfo.id asc'',1,20 ' END 上面是存储过程

34,593

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧