Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SOS please help with constraint check with like
juan wrote:
> a last question:
>
> could you say me the complete syntax of TRANSLATE?
>
> because in other case, that not all positions will be numbers, i don't know
> use TRANSLATE.
>
> thank you.
TRANSLATE is one of the most powerful an useful built-in functions Oracle has.
Follow the examples at:
http://www.psoug.org/reference/translate_replace.html
and it should become obvious. Be sure to create variations on your own too.
Basically the function has three parts:
TRANSLATE(<part_one>, <part_two>, <part_three>)
part_one is what is translated part_two is a positional list of characters to be translated part_three is a positional list of result characters
so TRANSLATE('abca', 'ab', xy') will start with 'abc' and produce 'xycx'
the both a's are replaced by x
the b is replaced by y
the c is ignored
-- 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 Feb 08 2004 - 13:55:41 CST
![]() |
![]() |