Reader Bob explains why aggregate concatenation results depend on expression location, using an ANSI point of view, and shares a similar example to run.
SQL SERVER – Interesting Observation – Index on Index View Used in Similar Query
A query on the base table used an index it did not own. It was the index on index view of the same table, an interesting observation from an optimization project.
SQL SERVER – Execution Plan and Results of Aggregate Concatenation Queries Depend Upon Expression Location
Aggregate concatenation queries can return different results depending on where the expression sits. A simple script based on a note I found on Ward Pond’s blog.
SQL SERVER – Discussion – Effect of Missing Identity on System – Real World Scenario
Is there any real world reason to list a missing identity in a table? Readers had no new script, but a lively discussion on whether gaps matter.
SQL SERVER – Puzzle – Write Script to Generate Primary Key and Foreign Key
A puzzle from a migration project: SSMS cannot script every Primary Key and Foreign Key at once. Can you write a script that generates them all?
SQL SERVER – Interesting Observation of Logon Trigger On All Servers – Solution
Why does a logon trigger on all servers fire several times for one login? The answer: several SQL Server services are running and IntelliSense is on.
SQL SERVER – Solution to Puzzle – Shortest Code to Perform SSN Validation
My solution to Jacob Sebastian’s puzzle: the shortest T-SQL code for SSN validation that removes invalid SSN values and returns only the valid ones.







