A script and UDF that show each current week date with its day, from Sunday to Saturday, using DATEPART and DATEADD. Handy for a weekly calendar report.
SQL SERVER – Insert Multiple Records Using One Insert Statement – Use of UNION ALL
Insert multiple records with one INSERT statement by combining SELECT and UNION ALL, instead of a separate INSERT for every row. SQL Server 2008 has a newer way.
SQL SERVER – Database Coding Standards and Guidelines Part 2
Database Coding Standards and Guidelines Part 2: skip SELECT *, use SET NOCOUNT ON, prefer CTEs over temp tables, avoid cursors, and more query tips.
SQL SERVER – Database Coding Standards and Guidelines Part 1
Database Coding Standards and Guidelines Part 1: naming rules for tables, stored procedures, triggers, indexes, primary keys and foreign keys.
Coding Standards: A Short Guide and a Practical Naming Check
Useful SQL coding standards give teams a short rule set with clear exceptions. Run a read-only naming report, check literal underscores in procedure prefixes and review the results before changing objects.
SQL SERVER – 2005 Explanation and Example – SELF JOIN
A self join joins a table to itself with table aliases. When to use one, why the joined columns must share a data type, and an employee example.






