5 Replies Latest reply: Jun 27, 2013 6:33 AM by Cheenu Janakiram RSS

    Creating multiple transactional lines from one line

      Hi everyone,

       

      I am having trouble with a(n) (intelligent) looped statement which looks into a specific field and generates multiple trnasactional rows from it. Has anyone come across this and found a cool way of resolving it.

       

      For example, I have a table such as:

       

       

      TxnIDProductInfo
      A1BananasYellow
      A2ApplesGreen;Red
      A3PearsYellow; Brown; Green

       

       

      and I want to get this out of it:

       

      TxnIDProductInfo
      A1BananasYellow
      A2ApplesGreen
      A2ApplesRed
      A3PearsYellow
      A3PearsBrown
      A3PearsGreen

       

      Naturally, the amount of ";" separated values in the original Info column changes depending on the table loaded and therefore, needs to change accordingly. Use of the "textBetween" function cannot be "hard-coded".

       

      Any suggestions?

       

      Cheers.