Qlik Community

QlikView Connectors

Discussion board for collaboration related to QlikView Connectors.

Announcements
Qlik Analytics Tour 2020 Online. Begins August 10th. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor II
Contributor II

Qlik Sense SAP Connector - Where Exists

Dear All,

I have some trouble with loading only relevant data with the SAP Connector; is it possible to work with a "where exists" statement? Could anyone provide me with an example of it?

E.g. I'm loading one table LIKP where LFDAT >= '20170101' and I would like to load only those details from LIPS where VBELN already exists..

Thanks and regards,

Philipp

3 Replies
Highlighted

Re: Qlik Sense SAP Connector - Where Exists

Off the top of my head, you can try using a nested select. Something like:

SELECT * FROM LIPS WHERE VBELN IN (SELECT VBELN FROM LIKP WHERE LFDAT >= '20170101');

Best,

Peter

Highlighted

Re: Qlik Sense SAP Connector - Where Exists

Hi Philipp,


Syntax:

... [NOT] EXISTS subquery ...


Effect:

This expression is true if the resulting set of the subquery contains at least one line (not).


Example:

SELECT VBAP~VBELN VBAP~POSNR VBAP~MATNR VBAK~VKORG

VBAK~VTWEG FROM VBAP INNER JOIN VBAK ON VBAP~VBELN

EQ VBAK~VBELN WHERE EXISTS ( SELECT VBELN FROM VBUK

WHERE VBELN EQ VBAP~VBELN )

Regards,

Hakan

Contributor II
Contributor II

Re: Qlik Sense SAP Connector - Where Exists

Thanks! Works well; didnt think about the nested select..

Philipp