Comments posted to this topic are about the item Formatting T-SQL Scripts using ScriptDOM and PowerShell
The actual script at the bottom works, thank you. The screenshots are blurry and should not be retyped
Thank you for pointing that out!! I may have had the variable defined elsewhere and it took that value while testing. Sorry for the screenshots and will try to fix those.
It's all good, my bad for retyping the screenshots while the actual script is at the bottom. That one works! Thank you for this article!
As is usual, excellent article, Mala. Thank you for taking the time to do the research and then put pen to paper in a meaningful and readable manner.
To quote from the article:
"ScriptDOM is very sparsely documented, and many of these capabilities have to be discovered by experimenting with the library and understanding it."
Heh, to summarize (IMHO), Microsoft <> Proper Documentation. Why should this be an exception?
And then there's this...
"The formatting option of ScriptDOM strips code of comments."
What in the hell is Microsoft thinking?
Are they using the same posteriorly-located brain they used when they created SPLIT_STRING() (among a litany of other features and "improvements") without returning the ordinal position of the split elements? Even if the poor handling of the CASE, the inability to suppress brackets, and the insane number of spaces used for indenting were somehow even close to be acceptable, this non-suppressible "feature" of killing all comments is a total non-starter for me.
Like I said, really incredible and very well done article, Mala. No one can take that away despite the horrors that MS continues to heap upon us in code and documentation, if the documentation actually exists.
This would be an interesting subject to talk about on Shop-Talk.
Change is inevitable... Change for the better is not.
Dear Jeff, yes of course, we will discuss it on shop talk 🙂 Thank you for taking time always to comment on my posts, much appreciated.
Viewing 6 posts - 1 through 5 (of 5 total)