• paul.knibbs (8/2/2013)


    Shawn Richards (8/1/2013)

    If the script button it is going to generate what it is going to run then how can the system generate buggy scripts?

    The same way a compiler can produce buggy code that doesn't do what the source says it should--or maybe DOES do it, but in an odd way. (My favorite example of that was when I wrote a simple loop in Visual C++ that took *ages* to execute. When I told the compiler to output the intermediate assembly code it was producing, I was somewhat surprised to find that this very simple little loop had translated into more than 3K of assembly language...and even more surprised when, as an experiment, I just deleted a single space and re-ran the compile, and now the code was down to the sort of size I expected it to be and the program ran fine). SSMS is a program written by humans, and as such, it can contain errors that will cause unexpected results!

    I don't disagree. However bad code that runs and fulfills the requirements which are set out is not buggy it is just bad. I did go on to say that it may product scripts which we don't like or take to long to run, just that i have never seen it to product buggy code i.e. code that will not fulfill the requirements which were set out via the interface.

    I know it does not always product good code which is why I almost always use the script button to understand what it is going to do and then assess.