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: <andrew2782_at_my-deja.com>
Date: Wed, 29 Sep 1999 16:04:39 GMT
Message-ID: <7stdad$8q5$1@nnrp1.deja.com>


In article <37F0EAC2.3F9DEF07_at_tstnet.com>,   Bret <bret.hill_at_tstnet.com> wrote:
> 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.
>
>

Bret,

If you want to get rid of ',', you can try select REPLACE('123,123,123',',','')

Hope helps.

Andrew

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Wed Sep 29 1999 - 11:04:39 CDT

Original text of this message

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