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: What am I doing wrong (RTRIM, PL/SQL)

Re: What am I doing wrong (RTRIM, PL/SQL)

From: Nilo <npaim_at_zaz.com.br>
Date: Tue, 28 Sep 1999 23:46:47 -0300
Message-ID: <7sru0l$5c0$1@srv4-poa.zaz.com.br>


Hi,

I'm not sure about what you intend to do, but i suppose you want to extract the initial digits of your string until the delimiter comma. If I'm right, you could try use SUBSTR and not RTRIM.

HTH --



Nilo <npaim123_at_zaz.com.br>
Please, remove numbers to reply

Bret <bret.hill_at_tstnet.com> escreveu nas notícias de mensagem:37F0EAC2.3F9DEF07_at_tstnet.com...
> Oracle 8.0.5
> I cannot find an example for what I am trying to do - I want to parse a
> string using rtrim but am having trouble.
> Here is a sample of what I am trying to do:
>
> declare col1 varchar2(10);
> begin
> col1:=rtrim('1111,2222,3333,4444',',');
> DBMS_OUTPUT.PUT_LINE(col1);
> end;
>
> These are the messages I get:
>
> ORA-06502: PL/SQL: numeric or value error
> ORA-06512: at line 3
>
> What am I doing wrong? - I've tried declaring col1 as a char(10), also
> I've tried selecting into it, but nothing seems to work.
>
Received on Tue Sep 28 1999 - 21:46:47 CDT

Original text of this message

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