• 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 favourite 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!