To concat strings in SQL Server, use the + operator or the CONCAT function. The tests here show what each one does with NULL, numbers and dates, how the 8000 character limit cuts a result, and when CONCAT_WS or STRING_AGG is the better tool.
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.
AutoRecover Settings in SSMS: Protect Your Unsaved Queries
The AutoRecover settings in SSMS decide how often unsaved work is copied to disk and how long the copies are kept. This post shows where to find the two options, what they can and cannot protect, how to test them once, and which habit still matters more than any setting.
Distributed Availability Groups: Linking Two Sites Without One Big Cluster
Understand distributed availability groups, connect two existing groups across sites, inspect health, and plan recovery without one cluster.
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.










