文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>用2005生成2000格式的存储过程sql

用2005生成2000格式的存储过程sql

时间:2010-09-20  来源:umen

--delete  test.dbo.Table_1

--test.dbo.Table_1 是存需要导出存储过程的列表
declare @strColName as varchar(50)
Declare Cur_NewTable Cursor
 For
Select a from test.dbo.Table_1
Open Cur_NewTable
While 1 = 1
Begin
    Fetch Next From Cur_NewTable Into
       @strColName

    IF NOT (@@FETCH_STATUS = 0)
        Break
 Set @strColName=LTrim(@strColName)
    Set @strColName=RTrim(@strColName)
   print 'SET QUOTED_IDENTIFIER ON
  GO
  SET ANSI_NULLS ON
  GO'
   print 'if exists (select * from dbo.sysobjects where id = object_id(N''[dbo].['+@strColName+']'') and OBJECTPROPERTY(id, N''IsProcedure'') = 1)'
   print 'drop procedure [dbo].['+ @strColName +']'
   print 'go'
   EXEC Sp_HelpText @strColName
   print 'GO
  SET QUOTED_IDENTIFIER OFF
  GO
  SET ANSI_NULLS ON
  GO'
End
Close Cur_NewTable
DeAllocate Cur_NewTable

--EXEC Sp_HelpText 'sGetTxNo'

相关阅读 更多 +
排行榜 更多 +
别惹神枪手安卓版

别惹神枪手安卓版

冒险解谜 下载
坦克战争世界

坦克战争世界

模拟经营 下载
丛林反击战

丛林反击战

飞行射击 下载