Wendy,

If I understood you correctly,

You need to create a cursor, then scan it in a loop and have column(s) of
each row concatenated to a variable. The variable I feel has to be a
varchar2 with enough size to hold the data of all the rows.

Just curious, apparently this does not seem to be a good thing to do, if you
could kindly share why do you want to do this.

HTH!

Aleem,

 -----Original Message-----
Sent:   Friday, March 30, 2001 8:36 PM
To:     Multiple recipients of list ORACLE-L
Subject:        Re: Concatenate rows

Hi Wendy,

Here's an example from a PL/SQL procedure:

        inputFromDate := startMonth||'/'||startDay||'/'||startYear;

The '/' is a delimiter, if you don't want one just use:

        inputFromDate := startMonth||startDay||startYear;

The individual data elements in this case were user input on a web
browser, but the same syntax applies if the elements had been selected
from tables.

Hope this helps.

David A. Barbour
Oracle DBA, OCP


Wendy Y wrote:
> 
> Hello:
> 
> Is there a way that we can Concatenate several rows (say 6 rows from a
> select statement) into one variable?
> 
> Thanks
> 
> Wendy
> 
> ----------------------------------------------------------------------
> Do You Yahoo!?
> Yahoo! Mail Personal Address - Get email at your own domain with
> Yahoo! Mail.
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: David A. Barbour
  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: Abdul Aleem
  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).

Reply via email to