1 Reply Latest reply: Jul 25, 2012 10:26 AM by Miguel Angel Baeyens de Arce RSS

    Preceding Load on a Load

    Amber Olnick
      Hey all,
      Is there anyway to do a calculation from two tables?  I'm stuck on the logic on this.  I tired a preceding load on a load and it's not working.  Here's an example.  When I go to load it, I get an error telling me that LL_Acct_Current_Balance is not found.  I'm thinking it's cause I have an left join involved.  Any ideas?
      LOANS:
      LOAD


      if( "LL_Acct_Current_Balance" > 0 AND "User_Alpha1" = 'CBS',1,0) as Count_LL_CBS,

      *;



      LOAD
           "Bank_Number",
           "Account_Number",
          
         
      "User_Date5",

         
      if("User_Alpha1" = 'CBS',1,0) as CBS_Count,

         
      if("User_Alpha1" = 'LTV',1,0) as LTV_Count,

         
      if("User_Alpha1" = 'DTI',1,0) as DTI_Count,

         
      "User_Alpha1",

         
      SQL SELECT
           "Bank_Number",

          "Account_Number",
        
          "User_Date5",

          "User_Alpha1"
         
      FROM "WB_Business_Objects".dbo.LOANS;



      LEFT JOIN (LOANS)



      LOAD

          "Acct_Nbr" AS Account_Number,

          if("LL_Acct_Current_Balance" > 0 ,1,0) as Count_LL,

         
      "LL_Acct_Current_Balance";


      SQL SELECT

          "Acct_Nbr",
          "LL_Acct_Current_Balance"
        
      FROM "WB_Business_Objects".dbo."Monthly_New_Loan_Volume_Comparisions";



        • Re: Preceding Load on a Load
          Miguel Angel Baeyens de Arce

          Hi,

           

          You will need to do the join, store the table into a QVD file, then load it doing the "Count_LL" field instead of a preceding load. It's because the JOIN, indeed, because when the preceding load is done, the field "LL_Acct_Current_Balance" does not exist, it will be created in that table after the JOIN.

           

          Hope that helps.

           

          Miguel