Remove repeated characters with GENERATE_SERIES, ROW_NUMBER, and ordered STRING_AGG, then benchmark a SQL Server 2019 fallback.
A Calendar Table With Holidays for Date Math
Build a calendar table with weekdays, fiscal months, and American holiday flags, then count working days and find useful date boundaries.
SQL SERVER – Find Referenced or Referencing Object in SQL Server using sys.sql_expression_dependencies
Which tables does a procedure use, and which procedures use a table? sys.sql_expression_dependencies answers both, with referenced and referencing objects.
STRING_AGG Limits: The 8,000 Byte Error, Ordering and Duplicates
Fix STRING_AGG 8,000-byte limits, enforce ordering, remove duplicates before aggregation, and compare its timing with XML.
Why Opening an MDF File Directly Goes Wrong
Before you attach MDF file copies, check SQL Server versions, service permissions, and missing files, then choose a safer restore or attach path.
The WINDOW Clause: Name a Window Once and Reuse It
Use the WINDOW clause to reuse partition and order rules, extend named windows with frames, and keep SQL Server calculations consistent.
SAMPLED vs DETAILED: Running index_physical_stats Safely
A misspelled table name quietly turns into a scan of everything. Here is the guard, and a fair comparison of the three scan modes on one small index.







