Well, this one is a "non-feature" to me

A buddy of mine came up to me today and goes, "Hey man, I scripted this proc out and the syntax is red".  (He's a Cognos guy, and not a SQL Server guy).  I said, "Yeah, some Einstein wraps everything around an sp_executesql these days when scripting.  I think they're showing off the fact that the string length is now varchar (max) where it wasn't before".  Since he had a few cycles, I told him to go look in the Tools>>Options menu and see if he could find why it scripts like this...I was busy myself and couldn't look into it. :)

 

image

image 

And, a few minutes later he came back and said "Found it!"  Apparently, in Tools>>Options, if you into scripting and change the Include IF NOT EXISTS clause equal to False, you will not get the code wrapped in an sp_executesql.

 

image

I just blogged the other day on some of the settings in this window, but maybe I should go back and revisit everything in there.  I might find some more cool "non-features" such as this.

 

Lee

------------------------------

I'm quite sure that I was very busy.

ebay

 

face


Posted in: Etc. (Off-topic)  Tags:
blog comments powered by Disqus

by Lee Everest, M.S.

Poll

Do you use Azure or cloud in your organization?



Show Results

Ads

Search


Month List

Calendar

«  February 2012  »
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
2728291234
567891011
View posts in large calendar

Tags

Disclaimer
The opinions, code, examples, et.al. expressed herein are my own personal opinions and do not represent my employer's view in any way, shape form, or fashion.  All code for demonstration purposes - no guarantees, either written or implied, are made.

© Copyright 2012 Lee Everest's SQL Server, etc. weblog