TRY_TO_IPADDRESS

functionsupportedCore SQL functions

docs.snowflake.com ↗

Conversion functionsIPADDRESS functions

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: - Error-handling conversion functions - TO_IPADDRESS

Syntax

TRY_TO_IPADDRESS( <string_expr> )

Parameters

NameRequiredDescription
string_exprrequiredA 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.