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: How to do with it?

Re: How to do with it?

From: <Mujeeb_ur_Rehman_at_hotmail.com>
Date: Fri, 28 Aug 1998 09:06:46 GMT
Message-ID: <6s5rv5$ph1$1@nnrp1.dejanews.com>


Hi :)

Well what u need to do is, that u concatinate all those strings like this.



DECLARE
      temp   varchar2(10) := null;
      wholetext   varchar2(200) := null;
     Cursor C1 IS
          SELECT NAME FROM TEST;

And I open the cursor:
OPEN C1;
LOOP

      FETCH C1 INTO temp;
      EXIT WHEN C1%NOTFOUND;
/* I want to have the result : 'This is test!'.  */
      wholetext := wholetext || temp || ' ';
END LOOP;

Hope this gets u started.



In article <35f276f6.10986646_at_news.twsc.pouchen.com.tw>,   violin.hsiao_at_mail.pouchen.com.tw (Violin) wrote:
> Hello,
> If I have a table with 3 rows:
> NAME
> ---------------
> This
> is
> test!
>
> And I have a cursor:
> DECLARE
> temp CHAR(20);
> Cursor C1 IS
> SELECT NAME FROM TEST;
>
> And I open the cursor:
> OPEN C1;
> LOOP
> FETCH C1 INTO temp;
> EXIT WHEN C1%NOTFOUND;
> /* I want to have the result : 'This is test!'. */
> temp = ??
> END LOOP;
>
> Please give some tips.
> Best Regards.
> Violin
> violin.hsiao_at_mail.pouchen.com.tw
>

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum Received on Fri Aug 28 1998 - 04:06:46 CDT

Original text of this message

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