burritonator
IS-IT--Management
I have written the following query to produce a list of IP addresses and related info:
SELECT IP, DepartmentName, NetworkID, Manufacturer, Model
FROM tblDevices
WHERE IP<>""
ORDER BY IP;
The problem that I'm having is that the IPs are being sorted in alphabetical order, meaning that, for instance, all of the IPs in the range 192.9.205.150-192.9.205.159 fall between 192.9.205.15 and 192.9.205.16 in the result set. What changes could I make to the query above so that the IPs in the result set will be sorted in numeric order from 192.9.205.1-192.9.205.255?
Thanks
SELECT IP, DepartmentName, NetworkID, Manufacturer, Model
FROM tblDevices
WHERE IP<>""
ORDER BY IP;
The problem that I'm having is that the IPs are being sorted in alphabetical order, meaning that, for instance, all of the IPs in the range 192.9.205.150-192.9.205.159 fall between 192.9.205.15 and 192.9.205.16 in the result set. What changes could I make to the query above so that the IPs in the result set will be sorted in numeric order from 192.9.205.1-192.9.205.255?
Thanks