1 Reply Latest reply: Nov 3, 2015 10:54 AM by Sunny Talwar RSS

    Transform table

    Hans Müller

      hi,

       

      please look at my app. There you can see is a Inline table called "Erstes Spiel" and a table called "Spiel". I want to transform  the Inline Table "Erstes Spiel"

      into "Spiel". I think I have to work with a loop cluase. Can anyone give my example to build this...

       

      Thank you

        • Re: Transform table
          Sunny Talwar

          Try this:

           

          ErstesSpiel:

          LOAD * INLINE [

              SpielsID, Home, Away, Result

              1, A, B, 2:0

              2, C, D, 3:4

          ];

           

          Temp:

          CrossTable(Column, Team, 2)

          LOAD SpielsID,

            Result,

            Home,

            Away

          Resident ErstesSpiel;

           

          Spiel:

          LOAD SpielsID,

            Team,

            If(SpielsID = Previous(SpielsID), SubField(Result, ':', 2), SubField(Result, ':', 1)) as Result

          Resident Temp;

           

          DROP Table ErstesSpiel, Temp;


          Capture.PNG