The Ultimate Index Lister (Pivoted)

  • YeshuaAgapao

    Hall of Fame

    Points: 3495

    Comments posted to this topic are about the item The Ultimate Index Lister (Pivoted)

  • Douglas Osborne-456728

    SSCommitted

    Points: 1569

    Jesse,

    That script is not rerunnable - try this for your existence check.

    IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[SP_Name]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)

    BEGIN

    DROP PROCEDURE [dbo].[SP_Name]

    END

    Good utility otherwise,

    Doug

  • YeshuaAgapao

    Hall of Fame

    Points: 3495

    I submitted a fix for the existance check. The 'U' should be 'P'. Several other of my submissions had the same issue and I submitted fixes for them also.

  • Douglas Osborne-456728

    SSCommitted

    Points: 1569

    Nice -

    IF OBJECT_ID('dbo.Util_ListIndexes_Columns', 'P') IS NOT NULL

    BEGIN

    DROP PROCEDURE dbo.Util_ListIndexes_Columns

    END

    is a bit more compact 😉

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply