6 Replies Latest reply: Jan 6, 2014 4:47 PM by Sophia Carmien RSS

    Combining information from previous tables in load script

      Okay, I'm not sure if this is possible.

       

      This is a simplified example of what tables my load script currently produces.

       

      Table 1 (From File 1)

      FieldAFieldB
      A1B1
      A2B2
      A3B3

       

      Table 2 (From File 2)

      FieldCFieldDFieldE
      C1D1E1
      C2D2E2

       

      I would like to keep those tables but add this one as well:

       

      FieldAFieldF
      A1C1
      A2C1+D1
      A3C2+D2+E2

       

      I'm not sure how to do this or if it's possible.  Here's the load script I was playing with, but I can't figure out what I would put for the FROM section.

       

      Load FieldA,

      If(FieldA=A1, C1,

           If(FieldA=A2, C1+D1,

                If(FieldA=A3, C2+D2+E2)

           )

      ) as FieldF

       

       

      I can't see concatenate or join working here since the FieldF is so erratic/illogical...  Can you pull from two resident tables or two files?  Or, am I missing the obvious, and there's an easy solution?