Convert IP address to decimal

From: Álvaro G. Vicario <>
Date: Mon, 08 Jun 2009 12:07:37 +0200
Message-ID: <h0inta$bg8$>

I’m looking for an Oracle function to convert a dot-format IP address into its numeric equivalent ('' --> 2130706433). I’ve googled for "ip2long", "inet_ntoa", "IP to decimal"... but I only get links to the PHP, MySQL or C implementations.

I don’t mind writing my own function but my PL/SQL skills are minimum and I can’t go past the initial step of splitting the string into four numbers (I can't find an Oracle equivalent of the split/explode functions available in other languages).

How can I proceed?

I’m running Oracle 10g XE on Windows XP. Thank you in advance.


Received on Mon Jun 08 2009 - 05:07:37 CDT

Original text of this message