A reader wanted students and courses grouped by course and instructor in a single row. Here is a simple concatenation trick with XML PATH that does it.
Where T-SQL Differs From the ANSI Standard
See where T-SQL differs from the ANSI standard in row limits, concatenation, NULL behavior, and practical query portability.
SQL SERVER – Check If String is a Palindrome in Using T-SQL Script – Reverse Function
A friend building a captcha had to skip words that read the same backward. Here is a T-SQL script with REVERSE to check if a string is a Palindrome.
Finding Duplicate Customers With T-SQL
Find duplicate customers with T-SQL by normalizing names, reviewing fuzzy matches, and merging records only after ownership is settled.
Removing Repeated Characters From a String With GENERATE_SERIES
Remove repeated characters with GENERATE_SERIES, ROW_NUMBER, and ordered STRING_AGG, then benchmark a SQL Server 2019 fallback.
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.
Display Datetime in a Specific Format: CONVERT and FORMAT
To display datetime in a specific format, use CONVERT with a style number or FORMAT with a pattern. This post tests both on a fixed value, shows the lowercase pattern mistake, measures how much slower FORMAT is, and explains why parsing text dates needs a style.






