1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

  2. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

How to convert address in IPv6 to number using Vertica

Discussão em 'Outras Linguagens' iniciado por Stack, Janeiro 27, 2021.

  1. Stack

    Stack Membro Participativo

    I have a table in Vertica db with column ip of type string that holds both formats of ipv4 and ipv6. I need to transform the string representation of the ip to a number as it is done for example here - https://www.ipaddressguide.com/ipv6-to-decimal

    To deal with ipv4 Vertica has built in function: inet_aton() https://www.vertica.com/docs/9.2.x/...eferenceManual/Functions/String/INET_ATON.htm

    SELECT INET_ATON('1.2.3.4');
    inet_aton
    -----------
    16909060


    I'm looking for the same functionality to convert ipv6 address to number: IP address 2001:569:7c0e:5700:1133:9bbd:232f:9c78 is equal to 42540597931374402043102832032222256248

    Continue reading...

Compartilhe esta Página