日期:2014-05-18 浏览次数:20560 次
ALTER PROCEDURE [dbo].[ModifySeq] @ProTableName varchar(20), @NewPrefix varchar(5), @Prefix varchar(5), AS begin exec ('UPDATE '+ @ProTableName + 'set RecId=REPLACE('+@ProTableName+'.RecId '+','+ @Prefix+','+@NewPrefix+')') END
IF EXISTS (SELECT 1 FROM SYSOBJECTS WHERE name = 'ModifySeq') BEGIN DROP PROC ModifySeq END GO CREATE PROCEDURE [dbo].[ModifySeq] @ProTableName varchar(20), @NewPrefix varchar(5), @Prefix varchar(5) AS begin EXEC ('UPDATE '+ @ProTableName + ' set RecId=REPLACE('+@ProTableName+'.RecId '+','+ '''' + @Prefix+ '''' + ','+ '''' + @NewPrefix + '''' +')') END GO