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. :)
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.
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.

51d93a5d-a928-4bcd-bb00-01c0f83fbcdd|0|.0