Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: PL/SQL substr(instr oracle
rs_arwar_at_hotmail.com (Rauf Sarwar) wrote in message news:<92eeeff0.0306181306.1bf89859_at_posting.google.com>...
>
> I am sure this can be done easily in PL/SQL but it's fun doing it in
> SQL -:)
<sorry, i love this kind of string processing!>
this is better than my previous attempt:
select substr('&STR',1,instr('&STR','_')-1|| translate(initcap(replace(substr('&STR',instr ('&STR','_')),'_',' ')),'abcdefghijklmnopqrstuvwxyz','_') from dual;
I'd love to see the DB2 and SQL Server boffins tells us how they do this. :D
Can anyone improve on it as is? It's darn efficient too: much less replaces/lengths/substr than before.
Cheers
Nuno Souto
wizofoz2k_at_yahoo.com.au.nospam
Received on Thu Jun 19 2003 - 17:48:53 CDT
![]() |
![]() |