Retrieves one of select properties of URL string

Free FunctionSQL Server Compatibility:
2008, 2008 R2, 2012, 2014, 2016

Syntax

UrlProperty ( Url, Property )

Arguments

Url
String containing a URL web address with an http, https or ftp scheme.

Property
One of the following string values: AbsolutePath, AbsoluteUri, Authority, DNSSafeHost, Fragment, Host, HostNameType, Port, Query, Scheme and UserInfo as well as LastSegment and TopLevelHost.

Return Type

varchar(MAX)

Examples

Properties of a URL with an https scheme:

Result:

Properties of a URL with an ftp scheme:

Result:

See Also

UrlProperty

Retrieves one of select properties of URL string

  • Free Function
  • SQL Server Compatibility: 2008, 2012, 2014, 2016, 2017

Syntax:

SELECT *
FROM SQLHTTP.net.UrlProperty ( Url, Property )

Arguments:

Name Type Description
Url ZZZZZ String containing a URL web address with an http, https or ftp scheme.

Property ZZZZZ One of the following string values: AbsolutePath, AbsoluteUri, Authority, DNSSafeHost, Fragment, Host, HostNameType, Port, Query, Scheme and UserInfo as well as LastSegment and TopLevelHost.

Return Type:

varchar(MAX)

Sample Usage:

See Also: