Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Cut string in a Select
select mat_codigo,
decode(length(replace(translate(mat_codigo,'0123456789','0000000000'),'0',''))
,NULL , mat_codigo , substr(mat_codigo,3,length(mat_codigo)-1) ) --from ma_con_matriculas || to_char( decode(length(replace(translate(mat_codigo,'0123456789','0000000000'),'0','')) , NULL , '' , ascii(substr(mat_codigo, 1))-64 || ascii(substr(mat_codigo, 2))-64) ) as mat_cod_ne -- as mat_codigo_nuevo -- , substr(mat_codigo, 3,length (mat_codigo_nuevo) ) from ma_con_matriculas
This is what i got so far but still with the same question, is it possible to join the new values at the beging of the string???
TY.
A Received on Thu May 10 2007 - 11:17:39 CDT
![]() |
![]() |