My first article on Simple-Talk introduces Change Data Capture in SQL Server 2008, which records INSERTs, UPDATEs and DELETEs in simple relational change tables.
SUM DISTINCT: Equal Amounts Are Not Duplicate Rows
SUM DISTINCT totals different amounts without checking order identity. I’d establish the row grain first. Compare equal-priced orders, repeated copies and missing amounts.
SQL SERVER – Reason for SQL Server Agent Starting Before SQL Server Engine Service
Why is SQL Server Agent starting before SQL Server Engine service? A user group member asked me, and here are my quick reasons, from jobs to OS tasks.
SQL SERVER – Backup master Database Interval – master Database Best Practices
How often should you back up master? It holds logins and server settings, so here are my master database best practices for backup timing.
Modulo: Negative Values Keep the Dividend Sign
Modulo can return a negative remainder for a negative dividend. A second expression normalizes a positive-divisor bucket while keeping the original input and remainder visible.
SQL Server – Multiple CTE in One SELECT Statement Query
How do you use multiple CTE in one SELECT statement? Two simple examples: independent CTEs joined together, and a second CTE built on the first.
Calculating Age From a Date of Birth Correctly in T-SQL
Use an explicit anniversary rule for calculating age in T-SQL, including February 29, years-months-days output and birthday lookups.







