Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: storing IP addresses

Re: storing IP addresses

From: Jerry Gitomer <jgitomer_at_hbsrx.com>
Date: Thu, 3 Jun 1999 13:42:37 -0400
Message-ID: <7j6ejl$n7v$1@autumn.news.rcn.net>


Hi Sam,

    You should look this up in a book or TCP/IP FAQ, but what difference does it make if a valid IP address begins with 0?

    If you application permits it just define the IP address as VARCHAR2(15). If the IP address is shorter Oracle will compress it. For subsequent processing you can use Oracle's string manipulation functions to extract the four pieces of the IP address so that you can operate on them. What is probably a better alternative is to store the IP address as four separate entities. in which case you can operate on each one independently and if necessary can "join" them into the IP address through the use of the concatenation operator on the output.

regards

Jerry Gitomer



Sam Petitto wrote in message <37540430.B117430D_at_netsec.net>...
>Are there any IP addresses that begin with a "zero" ?
>What data type should I use to store IP addresses ?
>One of the main functions of the DB I'm building is to store
>and mine through these to look for hit patterns by IP address.
>I'm using 8i on NT
>TIA
>
>Sam Petitto
>Database Engineer
>N.S.T.I.
>703.561.0420
>
>
>
Received on Thu Jun 03 1999 - 12:42:37 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US