carguy86 Posted November 22, 2011 Posted November 22, 2011 I have a db that holds a lot of information about each unit in our inventory. I am attempting to write a script that would show a list of values "open" for a particular field (IP Addresses) Basically Field IP4 will have a number between 1 and 3 characters between 1 and 254. I want to find (after going through each record) which IP's are NOT being used (Wouldn't have a record). For instance: Record 1 = 2 Record 2 = 5 Record 3 = 10 I want a container field to be populated with: 1 3 4 6 7 8 9 Etc all the way to 254 (If 254 is not being used that is) Any ideas?
comment Posted November 22, 2011 Posted November 22, 2011 You can't find something you don't have. Perhaps you should pre-create all possible records and mark those that are being used? Otherwise you'd need a script or a custom function to generate a list of numbers in the range 1...254, then go over all records and scratch out the numbers being used.
Lee Smith Posted November 22, 2011 Posted November 22, 2011 Basically Field IP4 will have a number between 1 and 3 characters between 1 and 254. I want to find (after going through each record) which IP's are NOT being used (Wouldn't have a record). This wouldn't be about serial numbers would it? Lee
carguy86 Posted November 28, 2011 Author Posted November 28, 2011 It's about IP Addresses that are being used. In other words something like 123.456.789.1 or 123.456.789.254. The last octet, or last set of 3 numbers is what is being checked. I think I will take the above suggestion and just create a second table then pre-populate it and populate the other lists with only the records not checked. I suppose I could also script it this way by checking whether a record exists for that number then inserting if it doesn't. Thanks for your help!
Recommended Posts
This topic is 4744 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now