1 Reply Latest reply: Aug 5, 2016 6:19 AM by Alexander Steinhart RSS

    QlikView SQL Select for SAP where Value is in other Table

    Alexander Steinhart


      I load data from SAP in QlikView.



      SQL Select



      from A004

      where DATAB  <=  '$(vdateToDay)' and .............. ;


      This part works well.


      Now I'd like to add an other table. But only if the key "KNUMH" have the same value.

      So I use a left join.


      left join (Table1)

      SQL select  MANDT,




      from KONP;


      This works but not very fast, because in KONP are 100 000 000 records and it load all records before the left join reduced the values. In Table1 I had the same problem, but after I add the "Where"-filter it works well.

      Now I like to Select only the records where KNUMH is in Table1.

      I try this way and some variants I find in the community:

      SQL select  MANDT,



      from KONP where  and KNUMH in (Select KNUMH FROM Table1);


      But it doesn't work. I like to use Table1 for the selection, because Table1 is filtered.

      Thank you for your support.