SQL count distinct subnets in an IP column
- by renhack
I need to get a get a count of all the distinct subnets in an IP column and group by the subnet on MS SQL. ie.. count all ips that have a subnet of 192.168.0,192.168.1,10.10.10 and so on.
Any help is appreciated. Thanks