Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: translate question
Shawn wrote:
> Ok, I made a mistake with a translate statement. It was my first time using
> translate of course. What I did was run this statement twice:
>
> update DOC_AC_TEL set SSN = TRANSLATE
> ('915482376','123456789',TRANSLATE(SSN, '1234567890','9732581406'));
>
> I should have only done it once. To "untranslate" the 2nd update I did.
> Would I be correct in running this:
>
> update DOC_AC_TEL set SSN = TRANSLATE
> ('123456789','915482376',TRANSLATE(SSN, '9732581406','1234567890'));
>
> Thanks,
> Shawn
Possibly. You made a mistake the first time that you don't recognize and you are making it again with this posting.
Always test.
Create a test table:
CREATE TABLE test AS
SELECT * FROM ....
Try it.
Had you done this the first time you'd not have made the mistake.
-- Daniel Morgan http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp damorgan_at_x.washington.edu (replace 'x' with a 'u' to reply)Received on Sun Dec 14 2003 - 11:55:08 CST