I have a huge list of 8500 ip addresses. In some instances, they have port numbers. I have tried importing the list in a temp table and then doing a substring but it still gives me some lines with extra spaces. For example, I did a
select substring(ip, 1, 11) from test
being the class c address is XXX.XXX.XXX which is 11 characters. There are some IPs which are like 64.2.7 which is 7 characters.
Is there a way I can get just the class c without having to manually go through to delete the extra characters?
Thanks!
Bill
select substring(ip, 1, 11) from test
being the class c address is XXX.XXX.XXX which is 11 characters. There are some IPs which are like 64.2.7 which is 7 characters.
Is there a way I can get just the class c without having to manually go through to delete the extra characters?
Thanks!
Bill