Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: update of a column
If IP is indexed, you might be better off performance-wise by changing the where clause to
WHERE IP LIKE '198%'
Buck Turgidson <jc_buck_at_YAH00.com> wrote in message news:tBJ_5.539$ug7.60215_at_bgtnsc04-news.ops.worldnet.att.net...
> 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:58:23 CST