STRING_SPLIT and its ordinal column preserve token positions when you request the third argument and sort by ordinal in SQL Server.
SQL SERVER – Comma Separated Values (CSV) from Table Column – Part 2
Comma Separated Values from a table column, part 2: SUBSTRING limits the XML length, so I rewrote the query with STUFF and FOR XML PATH to remove it.
SQLAuthority News – Featured on Channel 9
This blog was featured on Channel 9 in This Week on Channel 9, where Scott Hanselman and Jon Galloway talked about my CSV from table column post.
Ordered Comma Lists With STRING_AGG and WITHIN GROUP
Build ordered comma lists with STRING_AGG and WITHIN GROUP, remove duplicates, handle nulls, and avoid fixed-length result limits.
MIN and MAX Text: Collation Chooses the Extremes
MIN and MAX text use collation ordering, not numeric magnitude. Compare digit strings, empty text and NULL using an explicit BIN2 contract.
Full-Text Search Basics
Full-text search basics explains catalogs, full-text indexes, CONTAINS, and LIKE so SQL Server searches match the question and the data.
LEFT Boundaries: Zero, Oversized Length and Missing Text
LEFT boundaries keep empty prefixes separate from missing values. Eight short Unicode cases expose zero, oversized and missing lengths. A separate invalid request shows why negative lengths need validation.







