5 Replies Latest reply: Mar 31, 2016 2:58 PM by Massimo Grossi RSS

    Data Load Issue

    mark pratt

      I'm trying to load the following, it doesn't give an error, but it says 0 lines fetched. Please help. Thanks.

       

      [CustomerTable]:
      LIB CONNECT TO [QlikSQL (cbsbank_mpratt)];
      LOAD
      [Name_ID],
      [Account_Number],
          [Closed_Acct_Flag],
          [Document_Distribution_Group];


      SQL SELECT 
      t0.Name_ID,
      t0.Account_Number,
      t1.COD_Account,
      t1.Closed_Acct_Flag,
      t1.Document_Distribution_Group,
      t2.DDA_Account,
      t2.Closed_Acct_Flag,
      t2.Document_Distribution_Group,
      t3.Note_Number,
      t3.Closed_Account_Flag as [Closed_Acct_Flag],
      t3.Document_Distribution_Group,
      t4.SAV_Account,
      t4.Closed_Acct_Flag,
      t4.Document_Distribution_Group

      FROM
      "WEEK"."dbo"."Name_To_All_Acct" as t0,
      "WEEK"."dbo"."COD_Codes"        as t1,
      "WEEK"."dbo"."DDA_Codes"        as t2,
      "WEEK"."dbo"."Note_Codes"       as t3,
      "WEEK"."dbo"."SAV_Codes"        as t4

      WHERE t0.Account_Number       =  t1.COD_Account
      and t0.Account_Number      =  t2.DDA_Account
      and t0.Account_Number     =  t3.Note_Number
      and t0.Account_Number     = t4.SAV_Account;

        • Re: Data Load Issue
          Sunny Talwar

          Have you tried running your SQL outside QlikView to check if any data is matches your Where statement to show any data?

            • Re: Data Load Issue
              mark pratt

              I really don't have a way to run it outside of Qlik. I do know that Account_Number and the others are the same. Basically Name_To_All_Acct is a relational table that relates the name table to the different account type tables. So there must be something wrong in the way I'm trying to pull this, because it should be pulling data. Good thought though, Thanks.

            • Re: Data Load Issue
              Ziad Mohammad

              Hi

              check if you have set set ErrorMode=0 then make to 1

              ErrorMode=1

                • Re: Data Load Issue
                  mark pratt

                  Not sure on what the ErrorMode is and how to change it. I do know I took out all but the Name_To_All_Acct and COD_Codes and loaded it and got back 50k+  lines. I then added DDA_Codes to the other 2 and got back only around 200 lines. I'm not sure the logic is right to get multiple tables to load/link the same fields.

                • Re: Data Load Issue
                  Massimo Grossi

                  start with 1 table

                   

                  SQL SELECT 

                  t0.Name_ID,

                  t0.Account_Number

                  FROM

                  "WEEK"."dbo"."Name_To_All_Acct" as t0


                  How many lines fetched?

                  Then add the 2nd one in the from and in the where


                  ............

                  FROM

                  "WEEK"."dbo"."Name_To_All_Acct" as t0,

                  "WEEK"."dbo"."COD_Codes"        as t1

                  WHERE t0.Account_Number       =  t1.COD_Account

                   

                  How many lines fetched?

                  Then add the 3rd one in the from and in the where

                  etc.. etc....