Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> 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 <abchaudhary-ho_at_beaconhouse.edu.pk> 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: dbarbour@nucentrix.netFat City Network Services -- (858) 538-5051 FAX: (858) 538-5051San Diego, California -- Public Internet access / Mailing Lists--------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E!
-Mail messageto: ListGuru@fatcity.com (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: abchaudhary-ho@beaconhouse.edu.pkFat City Network Services -- (858) 538-5051 FAX: (858) 538-5051San Diego, California -- Public Internet access / Mailing Lists--------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail messageto: ListGuru@fatcity.com (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).</BL!
![]() |
![]() |