A similar question was asked a while ago and I kept the answer as I thought
it might be useful
The following PL/SQL snippet should demonstrate a way to do what you want
set serveroutput on 1000000
Declare
sn varchar2(2000);
cursor c_devices is
select name from ashoke;
Begin
for v_devices in c_devices loop
exit when c_devices%notfound;
sn := sn || ',' || v_devices.name;
end loop;
dbms_output.put_line(sn);
End;
/
John
-----Original Message-----
Sent: 29 July 2002 15:08
To: Multiple recipients of list ORACLE-L
Gurus,
Please read the following problem and help me if you have any solution.
Select product_id from <tname> where id = 2;
Product_ID
--------------
A
B
C
D
But I want the output as follows:
Select product_id from <tname> where id = 2;
Product ID
-------------
ABCD.
Thanks in advance.
regards,
Karthik
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: karthikeyan S
INET: [EMAIL PROTECTED]
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
INET: [EMAIL PROTECTED]
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).