I noticed the docs for STRING_SPLIT now show that there is a third parameter. This brings us an ordinal for the positioning of the data. The format is now:
STRING_SPLIT( string, separator [, enable_ordinal])
This is a bit or int that determines if a positional value is added to the result set. Here’s a quick demo.
No third parameter shows this:
If I add a 1 for the third parameter, I see this:
Right now this is only in Azure. I assume we’ll see this in SQL Server 2022, but we’ll have to wait and see.