RE: Concatenate rows
May be you could try this, this requires a little more effort, but assures that complete contents will be displayed. Try using a CURSOR FOR LOOP of the fetched record, have the contents copied to a text file, and display the text file using OLE etc. controls. HTH! Aleem -Original Message- From: Wendy Y [mailto:[EMAIL PROTECTED]] Sent: Monday, April 02, 2001 6:25 AM To: Multiple recipients of list ORACLE-L Subject: RE: Concatenate rows Aleem: Yes, your understand right! I'm concating ROWS, not columns. My client has several comment text box (columns). When the previous fired, it will send couple of messages (rows) as comments - the way it designed. They need to combine these text comments into one comment box. My delimn: previously each text box is varchar2(2000), of course I may have 3-6 of these messages. But after concating, the text box will still be varchar2(2000). I understand that to concate them all will not lose anything. Than I have to go through a cursor loop as you suggested. But is therre another way to do this without missing anything? And keep in mind that all of these are in my mutating table trigger. Thanks for all the advise! Wendy Abdul Aleem <[EMAIL PROTECTED]> wrote: 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 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). Do You Yahoo!? Yahoo! Mail Personal Address - Get email at your own domain with Yahoo! Mail.
RE: Concatenate rows
Aleem: Yes, your understand right! I'm concating ROWS, not columns. My client has several comment text box (columns). When the previous fired, it will send couple of messages (rows) as comments - the way it designed. They need to combine these text comments into one comment box. My delimn: previously each text box is varchar2(2000), of course I may have 3-6 of these messages. But after concating, the text box will still be varchar2(2000). I understand that to concate them all will not lose anything. Than I have to go through a cursor loop as you suggested. But is therre another way to do this without missing anything? And keep in mind that all of these are in my mutating table trigger. Thanks for all the advise! Wendy Abdul Aleem <[EMAIL PROTECTED]> wrote: Wendy,If I understood you correctly,You need to create a cursor, then scan it in a loop and have column(s) ofeach row concatenated to a variable. The variable I feel has to be avarchar2 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 youcould kindly share why do you want to do this.HTH!Aleem,-Original Message-Sent: Friday, March 30, 2001 8:36 PMTo: Multiple recipients of list ORACLE-LSubject: Re: Concatenate rowsHi 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 selectedfrom tables.Hope this helps.David A. BarbourOracle DBA, OCPWendy 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. BarbourINET: [EMAIL PROTECTED]Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051San Diego, California -- Public Internet access / Mailing ListsTo REMOVE yourself from this mailing list, send an E! ! -Mail messageto: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and inthe message BODY, include a line containing: UNSUB ORACLE-L(or the name of mailing list you want to be removed from). You mayalso send the HELP command for other information (like subscribing).-- Please see the official ORACLE-L FAQ: http://www.orafaq.com-- Author: Abdul AleemINET: [EMAIL PROTECTED]Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051San Diego, California -- Public Internet access / Mailing ListsTo REMOVE yourself from this mailing list, send an E-Mail messageto: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and inthe message BODY, include a line containing: UNSUB ORACLE-L(or the name of mailing list you want to be removed from). You mayalso 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.
Re: Concatenate rows
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 webbrowser, but the same syntax applies if the elements had been selectedfrom tables.Hope this helps.David A. BarbourOracle DBA, OCPWendy 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. BarbourINET: [EMAIL PROTECTED]Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051San Diego, California -- Public Internet access / Mailing ListsTo REMOVE yourself from this mailing list, send an E-Mail messageto: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and inthe message BODY, include a line containing: UNSUB ORACLE-L(or the name of mailing list you want to be removed from). You mayalso 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.
RE: Concatenate rows
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).
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).
Concatenate rows
Hello: Is there a way that we can Concatenate several rows (say 6 rows from a select statement) into one variable? Thanks WendyDo You Yahoo!? Yahoo! Mail Personal Address - Get email at your own domain with Yahoo! Mail.