Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Apoorva_sd
Contributor III
Contributor III

Issue with where Exists clause in Qlik SaaS

Hello,

I am trying to load the following inline table and then load only load those IDs from this table in the next table but I get a "0 lines fetched" message for the second table. This code is working fine in the client managed version, but not in the cloud. Any help on this?

Table1:

Load * Inline

[ Product Name, Product ID, Product Name New

One, 1R, First

Two, 1-1R, First

Three, 2R, Second

Four, 2-1R, Second

]

Qualify*;

Unqualify [Product ID];

Load A as [Product ID],

B as Plant,

C as Location,

D

E

where exists(Product ID, A);

Select A,

B,

C,

D,

E

From Table2;

This is the sample script that resembles my original script where I am trying to load only those product IDs that are in the above inline table from SAP.

So, when I use A in the front end it should only contain - 1R, 1-1R, 2R and 2-1R. But, I see other values that are in A.

Thank you,

Apoorva

Labels (1)
  • SaaS

1 Solution

Accepted Solutions
Apoorva_sd
Contributor III
Contributor III
Author

Hello,

Thank you for the response! The values do associate when I do not use the "Exists" function.

I had to save the table I loaded from SAP to a QVD and then loaded the data from this QVD where I applied the where exists clause, that worked. So, the issue has been resolved.

Thank you.

View solution in original post

3 Replies
treysmithdev
Partner Ambassador
Partner Ambassador

I have seen some differences between the SAP connectors, which has been due to the differences between ODBC (QSEoW) and JDBC (Qlik Cloud).

My recommendation would be to load Table 2 without the Exists condition and see if the values associate. Also take a look in the data preview in the data model view.

 

I would do this test including the Load statement and with just the SQL statement.  Reason being that Qlik does some typing magic during the Load statement that may not present itself when just doing the SELECT.

Example:

With

Load
A as [Product ID],
B as Plant,
C as Location,
D,
E
;
Select
A,
B,
C,
D,
E
From Table2;

 

Without

SQL SELECT
A as "Product ID",
B as Plant,
C as Location,
D,
E
From Table2;

 

Blog: WhereClause   Twitter: @treysmithdev
Muthukumar_77
Contributor III
Contributor III

Try below script,

Table1:
Load * Inline [ 
Product Name, Product ID, Product Name New
One, 1R, First
Two, 1-1R, First
Three, 2R, Second
Four, 2-1R, Second
];
 
Table2:
Load A as [Product ID],
B as Plant,
     C as Location,
     D,
     E Where Exists([Product ID],A);
Select A,
   B,
       C,
       D,
       E
From Table2;
Thanks Regards,
Muthukumar P
Qlik Developer
Apoorva_sd
Contributor III
Contributor III
Author

Hello,

Thank you for the response! The values do associate when I do not use the "Exists" function.

I had to save the table I loaded from SAP to a QVD and then loaded the data from this QVD where I applied the where exists clause, that worked. So, the issue has been resolved.

Thank you.