Oh yeah I agree with that. I'm just saying that as long as Microsoft keeps putting out garbage like CrapPoint, all of my SQL generation solutions will have to assume that any object could be named poorly, and hence they will always apply QUOTENAME() to any database, table, object, column name, etc.
A long time ago I used to preface my scripts saying, "this will work as long as you don't have database names with illegal characters or that start with a number" - now I don't even bother. Too many people complained, "but it broke when it hit my database 2 cool for school!"
There are 3 completely different statments in this sproc. Each does a completely different thing. Essentially the parameter is a string and wheather you say "1" "2" or "3" it will run each different sproc.
Now this sproc is called at the exact same time by 3 different OLEDB commands in SSIS each is set to 1 2 or 3