Scripting Objects in SSMS - sp_executesql

الإجابة Scripting Objects in SSMS - sp_executesql

  • 03 Juli 2012 18:46
     
      Memiliki Kode

    I have been scripting objects (tables, views, sps, etc.) since SS2K.  When I do it, I get a script that what you would think, for example:

    CREATE PROCEDURE [dbo].[pr_my_stored_proc] @parm1, @parm2, etc.

    Now, for some reason, I get the following when I try to script my object:

    EXEC dbo.sp_executesql @statement = N'
    CREATE PROCEDURE dbo].[pr_my_stored_proc] @parm1, @parm2, etc. ... a big long string.
       

    This would be OK except that I want to modify the code. In its "text" form, I have to remove double "single quotes" everywhere and it is a royal pain.

    Would anyone know if this is a recent change or is there a setting that could change it back to the original method?

    Thanks,

    Tom

Semua Balasan