'modify' stored procedure opens does not open for modifications as earlier

  • when i click on the modify option on a stored procedure it is not opening for editing as earlier. it opens as if for scripting.

    for example i clicked modify procedure on stored proc. "text" and the result is as follows. someone please help

    /****** Object: StoredProcedure [dbo].[test] Script Date: 05/01/2015 7:50:08 PM ******/

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[test]') AND type in (N'P', N'PC'))

    BEGIN

    EXEC dbo.sp_executesql @statement = N'-- =============================================

    -- Author:<Author,,Name>

    -- Create date: <Create Date,,>

    -- Description:<Description,,>

    -- =============================================

    ALTER PROCEDURE [dbo].[test]

    AS

    BEGIN

    -- SET NOCOUNT ON added to prevent extra result sets from

    -- interfering with SELECT statements.

    SET NOCOUNT ON;

    select * from room

    -- Insert statements for procedure here

    END

    '

    END

  • 'Scripting' is how stored procedures are modified – it is the only way.


  • i bleieve you recently modified this location in SSMS, which decides whether something is scripted with a if not exists selection:

    it may have been modified as a patch or something, but it definitely was modified, if it was not doing it before:

    just toggle it back and it wills cript the wya it did before.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Ah, now I understand.

    Go to Tools/Options in SSMS. Select SQL Server Object Explorer / Scripting.

    Set 'Check for object existence' to False.


  • Thank you Lowell ..i did as you explained and now it works.

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

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