Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Select Query - Help required

RE: Select Query - Help required

From: <John.Hallas_at_vodafone.co.uk>
Date: Mon, 29 Jul 2002 08:05:42 -0800
Message-ID: <F001.004A4AED.20020729080542@fatcity.com>


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: skarthik_at_globalsw-in.com

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: ListGuru_at_fatcity.com (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: John.Hallas_at_vodafone.co.uk
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: ListGuru_at_fatcity.com (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). Received on Mon Jul 29 2002 - 11:05:42 CDT

Original text of this message

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