December 29, 2008 at 4:14 pm
I'm trying to modify many user defined functions in SSMS (2005). When I right click on the function and select 'Modify' or 'Script function as...', the text displayed in the editing screen looks as if it is dynamic SQL (2 single quotes instead of 1 for text, execute sp_executesql at the beginning, etc.). Is there a way to open a UDF for editing without the dynamic sql stuff?
Thanks in advance-
December 29, 2008 at 5:23 pm
yeah that's deeply annoying...I'd like to switch it back as well;
my alternative is to sp_helptext functionname/proc/view to avoid the dynamic sql style...but that's a bandaid, not a solution
Lowell
December 29, 2008 at 8:13 pm
which version are you using? I've seen that before but not on the version i currently use, i'm on my laptop right now and this is what i get from the help... about screen.
Microsoft SQL Server Management Studio Express9.00.2047.00
Microsoft Data Access Components (MDAC)6.0.6001.18000 (longhorn_rtm.080118-1840)
Microsoft MSXML3.0 4.0 5.0 6.0
Microsoft Internet Explorer8.0.6001.18241
Microsoft .NET Framework2.0.50727.1434
Operating System6.0.6001
Etni
December 29, 2008 at 10:04 pm
This happens when you have the "If EXISTS" option on.
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
December 30, 2008 at 8:52 am
Where can the 'if exists' option be turned off or on?
December 30, 2008 at 9:06 am
Its a scripting Option. Look in SSMS under Tools..Options.., select the "Scripting" tab, then scroll down to the "Include IF NOT EXISTS clause" option and set it to FALSE.
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
December 30, 2008 at 9:10 am
Thank you, Thank you, Thank you!!!!!
December 30, 2008 at 9:19 am
Glad I could help. 🙂
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply