3 Replies Latest reply: Feb 22, 2018 5:27 AM by Tamil arasu RSS

    Duplicate rows based on field quantity

    chu ying kok

      Dear all,

       

      I have a table as shown below.

        

      CodeQty
      A0011
      A0021
      B0012
      B0023

       

      I am trying to achieve the breakdown of quantity to 1 unit per row.

      How do I go about using a 'for loop' to duplicate the records? Or suggest any better methods.

        

      CodeQty
      A0011
      A0021
      B0011
      B0011
      B0021
      B0021
      B0021

       

      The above is just a simple example. There could be multiple fields.

      Thanks in advance!