Hi all,
I have some lengthy tables filled with IP addresses. Given that the IP
addresses are contained in a single text field (and not four individual
octet fields), what would be the SIMPLEST way to sort those IPs in a SQL
query?
For example, 'SELECT IP FROM IP_TABLE ORDER BY IP' produces the
following sort order:
123.123.123.10
123.123.123.11
123.123.123.2
123.123.123.20
123.123.123.21
123.123.123.3
But, of course, the desired results would instead be:
123.123.123.2
123.123.123.3
123.123.123.10
123.123.123.11
123.123.123.20
123.123.123.21
Any help is greatly appreciated.
Dave
--
David M. Delbridge
Circa 3000
ColdFusion Hosting
http://www.circa3k.com
775-832-2445
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
- Re: Sorting IP Addresses David Delbridge
- Re: Sorting IP Addresses Michael Dinowitz
- Re: Sorting IP Addresses David Delbridge
- RE: Sorting IP Addresses Dan G. Switzer, II
- Re: Sorting IP Addresses Marlon Moyer
- Re: Sorting IP Addresses David Delbridge
- Non-Stick Session Variables? Nick Baker
- RE: Non-Stick Session Variables? Mosh Teitelbaum
- RE: Sorting IP Addresses Raymond Camden
- Re: Sorting IP Addresses Michael Dinowitz
- RE: Sorting IP Addresses Barney Boisvert