3 Replies Latest reply: Jun 17, 2018 11:44 AM by Rob Wunderlich RSS

    Tbl2 data will not load

    Luke Nathan

      I am trying to load a table with just records that have the ProductName ‘Jacuzzi’ and another table with just records that have the ProductName ‘Wine Glass’.

       

      All table data is coming from the same source but the second table (Tbl2) will not load and its syntax coloring indicates a problem.  I intend to drop both tables after the load is finished can you help?

       

      Tbl1:

      LOAD

          "CategoryID",

          "ProductID",

          "QuantityPerUnit",

          "SupplierID",

          "ItemCost",

          "ItemPrice",

          "UnitsInStock",

          "UnitsOnOrder",

          "UnitCost",

          "CurrentPrice",

          "ProductName",

      FROM [lib://SOP.xlsx]

      (ooxml, embedded labels, table is [Products]);

      If(WildMatch([ProductName],'*Jacuzzi*')

       

      Tbl2:

      LOAD

           "CategoryID",

          "ProductID",

          "QuantityPerUnit",

          "SupplierID",

          "ItemCost",

          "ItemPrice",

          "UnitsInStock",

          "UnitsOnOrder",

          "UnitCost",

          "CurrentPrice",

          "ProductName",

      FROM [lib://SOP.xlsx]

      (ooxml, embedded labels, table is [Products]);

      If(WildMatch([ProductName],'*Wine Glass*')

        • Re: Tbl2 data will not load
          Rob Wunderlich

          First, Tbl2 will not create a seperate table. It will be automatically concatenated to Tbl1 because the Feld list is the same. If you separate tables, add the NoConcatenate keyword before LOAD in the Tbl2 load.

           

          Your filtering statement is incorrect. It should be a "where" clause and is part of the load statement (before the semicolon)

           

          FROM [lib://SOP.xlsx]

          (ooxml, embedded labels, table is [Products])

          where WildMatch([ProductName],'*Wine Glass*');


          -Rob