|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Monday, April 29, 2013 11:08 AM
Points: 80,
Visits: 579
|
|
I just removed SQL Server 2008 Developer and installed SQL Server 2008 Developer R2.
Ever since then if I try to script a stored procedure the procedure script returns bundled in a sp_executesql statement like the one below.
I have never seen anything like this and can't find an option for this anywhere. Any advice is appreciated.
EXEC dbo.sp_executesql @statement = N'--------Procedure Code---------'
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Monday, February 18, 2013 3:46 AM
Points: 1,422,
Visits: 1,883
|
|
You'll need to modify your SSMS settings.
Go to Tools -> Options and in the left pane choose SQL Server Object Explorer -> Scripting.
In the scripting options go to the "Object Scripting Options" section and set the "Include IF NOT EXISTS clause" to False. The dynamic SQL thingy comes up when this is set to True.
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Monday, April 29, 2013 11:08 AM
Points: 80,
Visits: 579
|
|
That did it 
Thank you very much it was driving me crazy. I had looked at that setting but did not have any idea that's what it did.
|
|
|
|