如何拼接下面两段SQL语句?
"select ip from ip.table "这条SQL语句查出的记录是IP地址。现在要将查出的IP地址给这一段
“select regexp_substr('IP','(\d{1,3})',1,1)*16777216
+regexp_substr('IP','(\d{1,3})',1,2)*65536
+regexp_substr('IP','(\d{1,3})',1,3)*256
+regexp_substr('IP','(\d{1,3})',1,4) from dual ” 【这段SQL会将IP转化成十进制的数】
希望得到的效果:
查出的ip ip对应转化的十进制数
192.168.40.15 3232245775
乞求各位大神,大牛出手相救



------解决思路----------------------
select regexp_substr(ip,'(\d{1,3})',1,1)*16777216
+regexp_substr(ip,'(\d{1,3})',1,2)*65536
+regexp_substr(ip,'(\d{1,3})',1,3)*256
+regexp_substr(ip,'(\d{1,3})',1,4)
from ip.table
------解决思路----------------------
这段写在什么地方的,Java代码中还是xml文件里