SDU Tools: Extracting URL components in SQL Server T-SQL
Our free SDU Tools for developers and DBAs, now includes a very large number of tools, with procedures, functions, and views. One common request that we’ve had, is that users need to be able to extract the component parts of a URL.
In the example above, you’ll see that we have added a table-valued function called URLComponents.
It supports protocols, host names, path names, search terms, and anchors.
In case, you need to process individual components, to help with that, we’ve added a number of scalar functions: URLToProtocol, URLToHostName, URLToPathName, URLToSearchTerms, and URLToAnchor.
2025-04-12