ALTER PROCEDURE [dbo].[DTSX] -- Add the parameters for the stored procedure here AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; DECLARE @totalcount INT SELECT @totalcount= COUNT(*) from dim.Metadata -- Insert statements for procedure here DECLARE @intFlag INT SET @intFlag = @totalcount WHILE (@intFlag >=1) BEGIN SELECT SourceSQL,SourceDB,DestinationDB,DestinationSQL FROM dim.Metadata Where ID=@intFlag PRINT @intFlag SET @intFlag = @intFlag - 1 CONTINUE; IF @intFlag = 0 -- This will never executed BREAK; END END
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)