Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: update of a column
UPDATE YOUR_TABLE
SET IP = '192' || SUBSTR(IP,4,LENGTH(IP))
WHERE SUBSTR(IP,1,3) = '198';
I don't have my system up now, so I can't test this, but this should give you an idea.
boo <boo_at_yahoo.com> wrote in message news:3A3AEF9F.FC8F2352_at_yahoo.com...
> Running Oracle 8.0.5 on Solaris 2.6
> We have a column called IP varchar2 (16) with data such as 198.1.2.30
> and want to update all rows, changing the 198 to 192,
> so the above example would then read 192.1.2.30.
>
> Would someone offer a suggestion on the best approach to update this?
>
Received on Sat Dec 16 2000 - 06:53:45 CST