Ip位址排序(Oracle下)

2021-06-02 00:00:58 字數 651 閱讀 6316

1.多網段情況下:

select ip,  

to_number(substr(ip,1,instr(ip,'.',1,1)-1)) as newip1,  

to_number(substr(ip,instr(ip,'.',1,1)+1,instr(ip,'.',1,2)-instr(ip,'.',1,1)-1)) as newip2,  

to_number(substr(ip,instr(ip,'.',1,2)+1,instr(ip,'.',1,3)-instr(ip,'.',1,2)-1)) as newip3,  

to_number(substr(ip,instr(ip,'.',1,3)+1,length(ip)+1-instr(ip,'.',1,3))) as newip4   

from itemfound 

order by newip1,newip2,newip3,newip4 

2. 單個網段情況下:

select ip,  

to_number(substr(ip,instr(ip,'.',1,3)+1,length(ip)+1-instr(ip,'.',1,3))) as newip4   

from itemfound 

order by newip4 

IP位址排序

class program d stringbuilder sb new stringbuilder 50 foreach match item in matchcoll strip sb.tostring endregion string ipaddress strip.split n 這樣每一組...

Oracle修改IP位址

oracle 資料庫所在的機器更改ip位址後,發現無法連線。需要修改一下對應的檔案 c oracle product 10.1.0 db 3 network admin listener.ora c oracle product 10.1.0 db 3 network admin tnsnames....

Oracle修改IP位址

oracle資料庫所在的機器更改ip位址後,發現無法連線。需要修改一下對應的檔案 c oracle product 10.1.0 db 3 network admin listener.ora c oracle product 10.1.0 db 3 network admin tnsnames.o...