Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Translate with Update
I think it's time to start reading some SQL books!
You are selecting from the table and that is quite different from updating a table.
I would try
update myTable
set col_name = translate( ... );
Mind you that this will cause dummy-updates on all records, and not just updates on "invalid" records.
Regards,
Patrick Sinke.
Sonja Barton <sbarton_at_starband.net> schreef in berichtnieuws
jKuM6.1132$XE.555120700_at_twister1.starband.net...
> Hi,
>
> I have several records in a db that contain illegal characters.
> SELECT TRANSLATE(col_name, '/-', '_') from myTable;
>
> does appear to replace all the "/" and "-" with "_".
>
> But, when I perform a select * from myTable, all the illegal chars are
> still there.
>
> So, I'm thinking I need to combine the translate with an update, but can't
> figure out the syntax.
>
> Help is appreciated!
>
> Thanks,
>
> Sonja
>
>
>
Received on Wed May 16 2001 - 09:30:20 CDT
![]() |
![]() |