S
Serg_R
Guest
Hi people,
need your help please,
I have a table with these fields:
"FirstIP", "LastIP" and "siteID".
I am trying to run a simple SELECT query in Access to retreive the IP range by supplying a valid IP address. The query, as you see, will propmt for IP address.
Here is the syntax:
SELECT Trim([Enter IP here]) AS Searched_IP, sites_ipranges.FirstIP, sites_ipranges.LastIP, sites_ipranges.SiteID,
FROM sites_ipranges
WHERE (((Trim([Enter IP here])) Between [sites_ipranges]![FirstIP] And [sites_ipranges]![LastIP]))
Results:
Searched_IP | FirstIP | LastIP | SiteID
=============================
What happens, that the query does not return IP ranges for all IPs, even it has a valid IP range.
For instanse, I have tested it with 6 IPs so far and it returns only IP ranges for only four IPs. If I take those two IPs and look up the IP range manually it is there, in the table.
My questions is: Why the query does not return the IP range, just blank fields, even the IP range is there for that IP.
You know, IP range could run from 1 to 255.
What I have noticed, that if an IP's last octet begins with a number more than 2 than it returns blank.
Please help to figure out the solutions and pls ask quetions.
Thank you very much!!!
Sergei
need your help please,
I have a table with these fields:
"FirstIP", "LastIP" and "siteID".
I am trying to run a simple SELECT query in Access to retreive the IP range by supplying a valid IP address. The query, as you see, will propmt for IP address.
Here is the syntax:
SELECT Trim([Enter IP here]) AS Searched_IP, sites_ipranges.FirstIP, sites_ipranges.LastIP, sites_ipranges.SiteID,
FROM sites_ipranges
WHERE (((Trim([Enter IP here])) Between [sites_ipranges]![FirstIP] And [sites_ipranges]![LastIP]))
Results:
Searched_IP | FirstIP | LastIP | SiteID
=============================
What happens, that the query does not return IP ranges for all IPs, even it has a valid IP range.
For instanse, I have tested it with 6 IPs so far and it returns only IP ranges for only four IPs. If I take those two IPs and look up the IP range manually it is there, in the table.
My questions is: Why the query does not return the IP range, just blank fields, even the IP range is there for that IP.
You know, IP range could run from 1 to 255.
What I have noticed, that if an IP's last octet begins with a number more than 2 than it returns blank.
Please help to figure out the solutions and pls ask quetions.
Thank you very much!!!
Sergei