Hello,
Does anyone have a better solution to my problem.
Please see this thread.
http://www.dbasupport.com/forums/sho...threadid=37631
Thank You
Roman
Printable View
Hello,
Does anyone have a better solution to my problem.
Please see this thread.
http://www.dbasupport.com/forums/sho...threadid=37631
Thank You
Roman
Not sure if this is more elegant, but this is one more way you can try.
Code:sql> select * from testip;
IPCOL
--------------------------------------------------
199.171.216.254:22808
199.171.216.255:22808
199.171.216.256:22808
199.171.216.257:22808
Elapsed: 00:00:00.15
sql> select substr(ipcol, 1, instr(ipcol, ':', 1, 1) - 1 ) from testip;
SUBSTR(IPCOL,1,INSTR(IPCOL,':',1,1)-1)
--------------------------------------------------
199.171.216.254
199.171.216.255
199.171.216.256
199.171.216.257
Elapsed: 00:00:00.16
sql> update testip set ipcol = substr(ipcol, 1, instr(ipcol, ':', 1, 1) - 1 ) ;
4 rows updated.
Elapsed: 00:00:00.16
sql> select * from testip;
IPCOL
--------------------------------------------------
199.171.216.254
199.171.216.255
199.171.216.256
199.171.216.257
Elapsed: 00:00:00.16
Better - in what context?
Right on target patel_dil.
Thank you
closing, duplicate.