On Tue, Dec 05, 2006 at 09:58:02AM -0700, Dennis Cote wrote:
> select
>case
>when substr(ip, 2, 1) = '.' then -- one digit first quad
>case
>when substr(ip, 4, 1) = '.' then -- 1 digit second quad
>case
>when substr(ip, 6, 1) = '.' then -- 1 digit t
Kevin Waterson wrote:
well, the range could be 256, or 16, or 131072 or 2048 or any other number
really.
but the IP will always be a valid IPv4 address.
Given a valid IPv4 address, I wish to find the range it falls into.
eg: SELECT * FROM table WHERE start < 203.7.136.123 AND 203.7.136.123 < (
On Tue, Dec 05, 2006 at 08:21:35PM +1100, Kevin Waterson wrote:
> This one time, at band camp, "Trevor Talbot" <[EMAIL PROTECTED]> wrote:
>
>
> > I'd store the IPs in the DB in integer form as Lloyd suggested, if
> > range queries are your goal. Do conversion to and from display format
> > in t
This one time, at band camp, John Stanton <[EMAIL PROTECTED]> wrote:
> You can add a custom function which calls the dotted IP to IP function.
yeah, thats what I was hoping to avoid.
So, my solution is to use awk to snarf the IP addresses from csv file before
import
and the convert to long IP a
Kevin Waterson wrote:
This one time, at band camp, "Trevor Talbot" <[EMAIL PROTECTED]> wrote:
I'd store the IPs in the DB in integer form as Lloyd suggested, if
range queries are your goal. Do conversion to and from display format
in the application.
Yes, they are stored as INTEGER. and
I feel little difficulty in understanding what you actually want (I
thing the same is for all...). So could make it more clear? so that your
problem can be solved fast!
Thanks,
Lloyd.
Yes, they are stored as INTEGER. and the conversion outside sqlite
> is simple. However, I still need to SEL
This one time, at band camp, "Trevor Talbot" <[EMAIL PROTECTED]> wrote:
> I'd store the IPs in the DB in integer form as Lloyd suggested, if
> range queries are your goal. Do conversion to and from display format
> in the application.
Yes, they are stored as INTEGER. and the conversion outside
On 12/4/06, Kevin Waterson <[EMAIL PROTECTED]> wrote:
This one time, at band camp, John Stanton <[EMAIL PROTECTED]> wrote:
> I suspect that you might find these blocks to be networks and subnets
> and consequently identified by the octets in the dotted IP.
yes, they would be nets and subnets.
This one time, at band camp, John Stanton <[EMAIL PROTECTED]> wrote:
> I suspect that you might find these blocks to be networks and subnets
> and consequently identified by the octets in the dotted IP.
yes, they would be nets and subnets.
But how to identify them or single out a net/subnet?
Ki
Kevin Waterson wrote:
This one time, at band camp, John Stanton <[EMAIL PROTECTED]> wrote:
Are you actually searching for membership in a class A, B or C network
or perhaps a subnet? If you are you can use the dotted format to your
advantage.
No, The search is for which registry owns the
This one time, at band camp, John Stanton <[EMAIL PROTECTED]> wrote:
> Are you actually searching for membership in a class A, B or C network
> or perhaps a subnet? If you are you can use the dotted format to your
> advantage.
No, The search is for which registry owns the block of IPs the that
Kevin Waterson wrote:
This one time, at band camp, John Stanton <[EMAIL PROTECTED]> wrote:
It looks as if you are looking to see if an address belongs to a
particular class B network. Are all your searches done that way?
If they are you may be able to use a regular expression to do your se
This one time, at band camp, John Stanton <[EMAIL PROTECTED]> wrote:
> It looks as if you are looking to see if an address belongs to a
> particular class B network. Are all your searches done that way?
>
> If they are you may be able to use a regular expression to do your search.
well, the r
Kevin Waterson wrote:
This one time, at band camp, "Igor Tandetnik" <[EMAIL PROTECTED]> wrote:
I don't quite understand. To continue your example, exactly which IP
addresses are considered to fall into the range "65536"? How do you
figure 1.2.3.4 is in this range, if indeed it is?
The beggi
This one time, at band camp, "Igor Tandetnik" <[EMAIL PROTECTED]> wrote:
> I don't quite understand. To continue your example, exactly which IP
> addresses are considered to fall into the range "65536"? How do you
> figure 1.2.3.4 is in this range, if indeed it is?
The begging IP may be 81.163.0.
The way I am dealing with this is...
First convert the IP to a 32bit integer. (In the system it will
represented as a 32bit integer)
Store it in the database.
Perform the comparison operations on this stored data.
Thanks,
Lloyd
On Mon, 2006-12-04 at 22:07 -0500, Igor Tandetnik wrote:
> Kevin
Kevin Waterson <[EMAIL PROTECTED]> wrote:
This one time, at band camp, "Igor Tandetnik"
<[EMAIL PROTECTED]> wrote:
How is the range specified?
In the database the IP is 1.2.3.4 and the range is eg: 65536
I don't quite understand. To continue your example, exactly which IP
addresses are con
17 matches
Mail list logo