- Categories:
TRY_ TO_ IPADDRESS¶
A special version of TO_IPADDRESS that performs the same operation (converts an input expression to an IPADDRESS value) but with error-handling support. If the conversion can’t be performed, it returns a NULL value instead of raising an error.
For more information, see the following topics:
Syntax¶
Arguments¶
string_exprA string expression that contains a valid IPv4 or IPv6 address.
Returns¶
Returns a value of type IPADDRESS or NULL when
TO_IPADDRESS would return an error.
Examples¶
The following example returns NULL because the input string isn’t an IP address:
For examples that convert an input expression to an IPADDRESS value, see TO_IPADDRESS.