Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to do with it?
How about
declare Cursor c1 is select temp from test;
showfield varchar(2000)
begin
open c1;
showfield := '';
dbms_output.enable();
for temp in c1
loop
showfield := showfield || temp;
end loop;
dbms_output.putline(showfield);
close c1;
end;
Something like that. I haven't run the code.
In article <6s18mv$t5k$1_at_news.Eindhoven.NL.net>,
"Jan D. Smit" <jds_at_sba.nl> wrote:
> How about this? It might help you even if I made typoes ;)
>
> declare
> cursor c1 is
> select name from test;
> begin
> for temp in c1 loop
> dbms_output.put(temp.name || ' ');
> end loop;
> dbms_output.new_line;
> end;
>
> Violin heeft geschreven in bericht
> <35f276f6.10986646_at_news.twsc.pouchen.com.tw>...
> >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 Wed Aug 26 1998 - 15:50:29 CDT
![]() |
![]() |