Hi, David:   Thanks.

I have already concated the table columns into one column, but in further I want to concate these rows from the select statement into one variable. Such as:

DECLARE v_day   date;

BEGIN

SELECT startMonth||startDay||startYear

INTO v_day

FROM time_table

WHERE startMonth BETWEEN ('JAN', 'DEC');

END;

My WHERE-condiction will return more than one rows in the procedure (I'm actually do these in a trigger). And I need to concate them together. I don't know if use a cursor to concate these rows into one would be to much? IS there an easy way to achieve the goal?

Thanks

Wendy

  "David A. Barbour" <[EMAIL PROTECTED]> wrote:

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
> Yah! ! oo! 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).



Do You Yahoo!?
Yahoo! Mail Personal Address - Get email at your own domain with Yahoo! Mail.

Reply via email to