2 Replies Latest reply: Oct 28, 2011 12:21 AM by Kamal Naithani RSS

    LEFT JOIN

      I have below two tables.

       

      Purchase Order NumberSupplier IDQtyPart NOPriceTotal
      101520SUP00125PART 00120500
      101520SUP00125PART 00120500
      Sales OrderCustomer IDPO NOQTYPart NO
      5010Cust 00110152025PART 001
      5011Cust 00210152025PART 001

      Table 1 is having purchase data while table two is having sales data.

      Both table have many other columns but don't required in this question so I have ignored them.

       

      1st table is linked with 2nd table with Left Join.

      Both tables have more than 10000 lines. Just two lines are shown for which I have problem.

       

      Question is.... I need Customer ID against my purchase table data. But due to Purchase Order Number, SUPPLIER ID, PART NUMBER and QTY all are same, chart/table in QlikView is confused which line is for which customer.

       

      Is there any function/method, so that both lines are giving different customer ID?

       

      Thanks in advance.

        • LEFT JOIN
          Stefan Wühl

          mrkachhia,

           

          I don't believe there's a way to do that using a join (at least if you use only the shown fields).

           

          The important thing would be to know how you handle this in your business, i.e. how do you decide in your real business which record of your purchase table belongs to which customer. Then it might be possible to tell QV what to do (Maybe by adding a new field to both tables indicating an order of records, if fields used to join have the same values for multiple records, but are not really duplicates for all fields).

           

          Regards,

          Stefan