WINDOW lets me name a window definition and reuse it across compatible calculations. I still specify the partition, ordering and frame. A short name should make the intended calculation easier to review.
TRANSLATE: Map Characters Simultaneously Instead of Cascading Replacements
TRANSLATE maps each input character once, which matters when replacement characters also appear in the search list. Nested REPLACE calls can process earlier replacements again. I compare both results before choosing a cleanup expression.
Showing Comma-Separated Role Members for Every Database Role
Comma-separated role members make direct assignments easier to review. The queries retain empty roles and label public membership as implicit. Keep the underlying rows because nested roles and directory groups need a separate effective-access review.
Splitting Text on Several Delimiters With REGEXP_SPLIT_TO_TABLE
REGEXP_SPLIT_TO_TABLE handles several separators in SQL Server 2025. These examples keep source keys and ordinals while separating trimming from empty-token handling. A small edge-case set also shows where a regular expression is not a CSV parser.
SQL SERVER – Query Analyzer Short Cut to display the text of Stored Procedure
A quick Query Analyzer shortcut: map sp_helptext to a key, select any SP name and display the text of Stored Procedure right in the result window.







