Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Query Editor SSMS 2008 R2 Strange Script


Query Editor SSMS 2008 R2 Strange Script

Author
Message
webooth
webooth
SSC Journeyman
SSC Journeyman (84 reputation)SSC Journeyman (84 reputation)SSC Journeyman (84 reputation)SSC Journeyman (84 reputation)SSC Journeyman (84 reputation)SSC Journeyman (84 reputation)SSC Journeyman (84 reputation)SSC Journeyman (84 reputation)

Group: General Forum Members
Points: 84 Visits: 580
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---------'



winash
winash
Ten Centuries
Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)

Group: General Forum Members
Points: 1424 Visits: 1883
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.



webooth
webooth
SSC Journeyman
SSC Journeyman (84 reputation)SSC Journeyman (84 reputation)SSC Journeyman (84 reputation)SSC Journeyman (84 reputation)SSC Journeyman (84 reputation)SSC Journeyman (84 reputation)SSC Journeyman (84 reputation)SSC Journeyman (84 reputation)

Group: General Forum Members
Points: 84 Visits: 580
That did it Exclamation Mark

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.



Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search