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: Help: Concatenating Records

Re: Help: Concatenating Records

From: Matthias Gresz <GreMa_at_t-online.de>
Date: 1997/12/01
Message-ID: <65ufiq$2lu$1@news02.btx.dtag.de>#1/1

Christine Elssner wrote:
>
> Hi,
>
> I'm looking for help for the following problem:
>
> I'm trying to write a Procedure to concatenate several records retrieved by a select statement. When trying to run the procedure, I get the following error messages:
>
> ORA-06502: PL/SQL: numeric or value error
> ORA-06512: at "SYSKEY.KANDIDATEN", line 13
> ORA-06512: at line 1
>
> And this is the procedure:
>
> CREATE or replace PROCEDURE KANDIDATEN (prof number) as
>
> kandidat varchar2(2000):='';
> xxx long;
> cursor cur is
> select a.vnam||' '||a.name||' ('||DIENSTE.TEXTN(d.ANTI,100125)||' '||initcap(d.vnam)||' '||initcap(d.name)||'

                                                    /\
convert to character ===============================||


> ' x
> from studenten a, pruefungen b, pruefer c, pruefer d
> where prof=b.pruefers and b.dts IS NOT NULL and b.noteps IS NULL
> and a.matr=b.matr and b.gutachter=d.persnr;
>
> BEGIN
> for rec in cur loop
> kandidat:=kandidat||rec.x;
> xxx:=kandidat;

xxx is defined as long while kandidat is defined as varchar2

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

> end loop;
> --update pruefer set pruefer.kandidaten=kandidat
> -- where pruefer.persnr=prof;
> --commit;
> END kandidaten;
> /
>
> Any Ideas?
>
> Greetings,
> Christine Elssner
 

-- 
Regards

Matthias Gresz    :-)
Received on Mon Dec 01 1997 - 00:00:00 CST

Original text of this message

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