4 Replies Latest reply: Nov 12, 2015 9:32 AM by Mark Little RSS

    How I can set a variable with value given from more table

    Pasquale Cosimato

      Hello,

      I have N tables with the same format, and how I want is set a Variable that will be the sum of the Column X with a particular condition.

      Immagine1.pngImmagine2.png

      I would like to set in Edit script vTotAge from all table that I have.

      Somethings like this :

       

      if(Nome='Pippo') then Sum(Age) from Table1   as TotTab1;

      if(Nome='Pippo') then Sum(Age) from Table2 as TotTab2;

      ..

      ..

      if(Nome='Pippo') then Sum(Age) from TableN as TotTabN;


      vTotAge = TotTab1+ TotTab2+...+ TotTabN

       

      Someone have a Solution for my Problem.

      Thanks in advances