I have a MS SQLServer 2005 table which includes an ipaddress column, and I would like to count entries by subnet.
Unfortunately the ipaddress column is a varchar with sample data like: 192.168.10.20 10.1.2.3
I think the best approach would be to convert the ipaddress to an integer, and then I could apply the appropriate bitmask.
Are there any suggestions on how to get a string of 4 octets into an integer?