IP Adresses - padding zeroes for ORDER BY
415794Apr 7 2004 — edited Apr 13 2004Hi!
I have a table with an IP address inside (type varchar2(50)). The data inside looks like 192.168.0.1. Now, my app should be able to ORDER BY this ip address. This means, when I do ORDER BY on this column without any changes, the output is wrong:
192.168.0.1
192.168.0.10
192.168.0.11
...
192.168.0.2
and so on.
Is there a way to temporarily pad the leading zeroes, e.g.
to 192.168.000.001?
Thanks in advance
André
PS: To all those who helped me with my large-table-speed-problem some months ago: The project has been dropped :-( Thanks again anyway.