How to Convert Binary (16bytes) to IP String
Moderator: NorbertKrupa
How to Convert Binary (16bytes) to IP String
We have stored IP address as Binary String. Could please tell me how to convert binary to IP String(xxx.xx.xx.xxx)?
Re: How to Convert Binary (16bytes) to IP String
Hi!
[DELETED]
[DELETED]
Last edited by id10t on Fri May 08, 2015 4:38 pm, edited 1 time in total.
-
- GURU
- Posts: 527
- Joined: Tue Oct 22, 2013 9:36 pm
- Location: Chicago, IL
- Contact:
Re: How to Convert Binary (16bytes) to IP String
As @sKwa suggests, we need to see an example of how you're storing the it.
For example 192.168.1.1 in expressed as 11000000101010000000000100000001 in binary with an octet length of 32.
If you're using an IPv6 address, Vertica has built in functions to convert to/from binary:
For example 192.168.1.1 in expressed as 11000000101010000000000100000001 in binary with an octet length of 32.
If you're using an IPv6 address, Vertica has built in functions to convert to/from binary:
Checkout vertica.tips for more Vertica resources.