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.
Find out more
You can see it in action in the main image above, and in the video here:
You can use our tools as a set or as a great example of how to write functions like these.
Access to SDU Tools is one of the benefits of being an SDU Insider, along with access to our other free tools and eBooks. Please just visit here for more info:
http://sdutools.sqldownunder.com
2025-04-12