8 Replies Latest reply: Apr 5, 2013 11:17 AM by Rebecca Molstad RSS

    How to concatenate rows based on certain conditions?

    Swarup Malli



         My requirement is to concatenate rows based on certain conditions.


          There are 3 fields




      The field WARRANTY_CLAIM contains numbers , TEXT_NOTE field contains comments  and the filed NOTE_SEQ indicates sequence.


      The problem here is the field Text_NOTE holds comments, the comments are distributed over multiple rows.


        What i mean by that is (see the attached file) the comment " Some issue with the component ,it broke and has to be replaced by the end of next month" has been broken down and distributed in 3 rows.




      Currently the values  in the field NOTE_SEQ 1305 indicates the start of comment,1306 indicates next comment followed by 1307 so on which ends at 1312.


      Similarly there are comments that start at 1205..may go till 1212


      some times a comment could fit in one row itself ..so it will have just a starting value of 1205 or 1305 (1205 or 1305 or 1605 indicate the start of comments)

      followed by a row with a different warranty claim number which may have the value 1605 under the field NOTE_SEQ.


      I'm trying to concatenate all the rows ..which should look like (see below)