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 – Insert Values of Stored Procedure in Table – Use Table Valued Function
How do you insert values of stored procedure output into a table? The traditional temp table way, and an alternate method with a Table Valued Function.
Integer Division: Keep Quotient and Remainder Together
Integer division and modulo can reconstruct the original signed dividend. These read-only cases keep both operands, quotient, remainder and reconstructed value together.
SQL SERVER – Introduction to Service Broker and Sample Script
Here is my introduction to Service Broker and sample script: messaging and queuing between instances, conversations and dialogs in SQL Server 2005.
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.
A Minimal BI Stack on SQL Server
A minimal BI stack can start with SQL Server tables, stable views, one scheduled load, and one reporting tool that a small team can run.
Ordered Comma Lists With STRING_AGG and WITHIN GROUP
Build ordered comma lists with STRING_AGG and WITHIN GROUP, remove duplicates, handle nulls, and avoid fixed-length result limits.
SQL SERVER – Converting Stored Procedure into Table Valued Function
Not every stored procedure should become a Table Valued Function. Here is which kind of SP qualifies, mainly one whose output you insert into another table.
High-Frequency Inserts Without Blocking
High-frequency inserts can stall on the log, indexes, or last-page contention; learn to diagnose the wait and choose targeted SQL Server fixes.
SQL SERVER – Cryptography in SQL Server 2008
A brief look at cryptography in SQL Server 2005 and 2008: why encryption belongs at the engine level, its effect on performance, and authentication basics.










