Speak guys !!
I would like to share with you a really cool new feature that I noticed in Azure SQL Database, which was the inclusion of a new parameter in the STRING_SPLIT function and that has been requested since the function was created in SQL Server 2016, which is the inclusion of the number of positions in the return of text breaks.
The problem is that the function didn't return the position number, so it was difficult to get the first element or the N element of the return. With that, I myself ended up using other alternatives, as I have already shown in the article How to wrap a string in a substring table using a delimiter in SQL Server and it works on any version of SQL Server.
So I imagine that soon, there should be some update to include this improvement for the On-Premisses versions.
- SQL Server - Charindex: A Different Function to Break Split Strings
- SQL Server - Breaking strings into sub-strings using a separator (Split string)
- SQL Server - Table-valued function to break a string into lines up to N characters long
- How to wrap a string in a substring table using a delimiter in SQL Server
- SQL Server - Using STRING_SPLIT to transform strings from a row into columns
So that's it, guys!
Short, quick and informative post.
A big hug and until next time!