Template Script: Util\Drop All to Redeploy.sql

USE Util
GO
SET NOCOUNT ON
GO
SELECT  'DROP ' + CreateDefinition + ' ' + s.name + '.' + o.name + '
GO'

FROM    sys.schemas s (NOLOCK)
INNER JOIN sys.objects o (NOLOCK) ON s.SCHEMA_ID = o.SCHEMA_ID
INNER JOIN util.dbo.SystemObjectTypes t ON t.Type = o.type COLLATE SQL_Latin1_General_CP1_CI_AS
WHERE   t.CreateDefinition IN ('FUNCTION', 'PROCEDURE', 'AGGREGATE')

Description for Template Script: Util\Drop All to Redeploy.sql

Todo
Site Map | Printable View | © 2008 - 2012 NuRoN Consulting, INC | Powered by mojoPortal | HTML 5 | CSS | Original design by Andreas Viklund
Share This Using Popular Bookmarking Services