1 Reply Latest reply: Aug 25, 2018 12:24 PM by Stefan Wühl RSS

    Can't get Join To Work

    Jeremy Newton

      Hey All,

       

      I'm pretty new to Qlik but not SQL. I'm trying to do a join on two loaded tables but keep getting an error at load that it can't find the Quota table. What am I doing wrong

       

      [Source]:

      LOAD*

      RESIDENT [sourceTable];

      DROP TABLE [sourceTable];

       

      [Quota]:

      LOAD*

      RESIDENT [quotaTable];

      DROP TABLE [quotaTable];

       

      SQL

      SELECT Quota.Material,

      Quota.Plant,

      Quota.BuyerCode,

      Quota.BuyerName,

      Quota.SBM,

      Quota.QuotaArrange,

      Quota.QuoteVendorCode,

      Quota.QuoteVendor,

      Quota.QuoteValidFrom,

      Quota.QuoteValidTo,

      Quota.QUOTE,

      Quota.Quota,

      Source.SourceVendorCode,

      Source.SourceVendor,

      Source.SourceValidFrom,

      Source.SourceValidTo,

      Source.Fix,

      Source.MRP

      FROM Quota LEFT JOIN Source ON (Quota.QuoteVendorCode = Source.SourceVendorCode) AND (Quota.Plant = Source.Plant) AND (Quota.Material = Source.Material)

      GROUP BY Quota.Material,

      Quota.Plant,

      Quota.BuyerCode,

      Quota.BuyerName,

      Quota.SBM,

      Quota.QuotaArrange,

      Quota.QuoteVendorCode,

      Quota.QuoteVendor,

      Quota.QuoteValidFrom,

      Quota.QuoteValidTo,

      Quota.QUOTE,

      Quota.Quota,

      Source.SourceVendorCode,

      Source.SourceVendor,

      Source.SourceValidFrom,

      Source.SourceValidTo,

      Source.Fix,

      Source.MRP

      ORDER BY Quota.Material,

      Quota.Plant,

      Quota.QuotaArrange;