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:

Comments

Add comment




  Country flag

biuquote
  • Comment
  • Preview
Loading




by Lee Everest, M.S.

Search


Ads

Calendar

«  July 2010  »
MoTuWeThFrSaSu
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678
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 2010 Lee Everest's SQL Server, etc. weblog