Hi,
in my table ip adresses are store xxx.xxx.xxx.xxx
(with the dots)
ip addresses go up to xxx.xxx.xxx.255
can i query the table to find out how many ip addresses are not used, and whcih ones they are?#
cheers MG
the field is part of a table that lists all bits of kit on the network with the items IP address [equiptcp]
i want the query to 'fill in the blanks' - that is produce a list of addresses that are not there
I recently had a similar problem, actual need was to find 'available' CostCentre numbers, given a list of used CostCentres and rules on how to derive a cost centre, logically similar to your problem
My solution may not be the most elegant, but it works heres is how I did it:
Create a table to hold list of available codes with a prime key of Code (Ip Address)
Write some code to generate a list of IP addresses, and insert a row into the table for each IP Address
Make a query which extracts only the unused addresses from this total list, something like
SELECT IpAddress FROM tblAllIps WHERE IpAddress NOT IN (SELECT ipAddress FROM tblEquipment) ORDER BY IpAddress;
Hope this works for you
Regards
Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now -
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.