Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: translate question

Re: translate question

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Sun, 14 Dec 2003 09:55:08 -0800
Message-ID: <1071424413.563836@yasure>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US