To IPv6 (ip6)
Description
Converts a string representing an IPv6 address or an IPv4 address in ip data type into an IPv6 address.
How does it work in the search window?
Select Create column in the search window toolbar, then select the To IPv6 (ip6) operation. You need to specify one argument:
Argument | Data type |
---|---|
String to convert / IPv4 to convert mandatory | string, ip |
The data type of the values in the new column is ip6.
Example
In the demo.ecommerce.data
table, we want to add a column showing the string 2001:0db8:85a3:0000:0000:8a2e:0370:7334 converted to ip6 data type. To do it, click Create column and select the To IPv6 (ip6) operation. The arguments needed are:
String to convert - Click the pencil icon and enter 2001:0db8:85a3:0000:0000:8a2e:0370:7334
Click Create column and you will see the following result:
How does it work in LINQ?
Use the operator select
... as
... and add the operation syntax to create the new column. These are the valid formats of the To IPv6 (ip6) operation:
ip6(ipv4_string)
ip6(ip)
Example
You can copy the following LINQ script and try the above example on the demo.ecommerce.data
table.Â
from demo.ecommerce.data
select ip6("2001:0db8:85a3:0000:0000:8a2e:0370:7334") as IPv6