Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

qlikviewalex
Not applicable

QlikView SQL Select for SAP where Value in other Table

Hello,

I load data from SAP in QlikView.

Table1:

SQL Select

  KNUMH,

     ...

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,

     KNUMH,

    

     ...

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,

     KNUMH,

          ...

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.


Regards

Alex


Tags (1)