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

Home -> Community -> Usenet -> c.d.o.server -> Re: PL/SQL substr(instr oracle

Re: PL/SQL substr(instr oracle

From: Nuno Souto <wizofoz2k_at_yahoo.com.au>
Date: 19 Jun 2003 15:19:38 -0700
Message-ID: <73e20c6c.0306191419.14f81f57@posting.google.com>


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 -:)
>

Oh come on!
What's all that uppercase/lowercase list of all the letters for?

This is much simpler:

select
substr('&STR',1,instr('&STR','_')-1)||
replace(translate(initcap(replace(substr('&STR',instr('&STR','_')), '_',' ')),'abcdefghijklmnopqrstuvwxyz',' '),' ','_') from dual;

:D)))

PS: Great use of functions in Oracle! Eat your heart out, DB2/commoncodebaseUDB/SQL Server crap!

Cheers
Nuno Souto
wizofoz2k_at_yahoo.com.au.nospam Received on Thu Jun 19 2003 - 17:19:38 CDT

Original text of this message

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