Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Partner
Partner

How to only load previously loaded data from second SQL query.

Hi,

I have loaded one table from SQL database with a certain conditions and named it as: "Customer_Ledger". I'm loading a second table from SQL database with select statement and I would like qlikview to check whether entry exists in "Customer_Ledger" table.

Could you give me an advice on how to do it? I know I would first load it from SQL and then use qlikview's logic to sort all the data out, but wouldnt the load speed be faster if I would limit the amount of loaded entries with SQL query? I have attached example below:

Customer_Ledger:

SQL select

"Entry No_",
"Document No_"

FROM "Ledger Entry" where "Posting Date" >= '1.1.2009';

SQL SELECT
"Document No_",
"Line No_",

FROM "'Detailed Ledger Entry" where ??? Insert reference to Customer_Ledger table;

The linking factor would be Document No_.

Thanks in advance.

2 Replies
Highlighted
Partner
Partner

How to only load previously loaded data from second SQL query.

And to clear things up a bit. As a result there should be two separate tables and the fields that should be compared are "Document No_" fields in both tables, which are later used to connect tables together.

Highlighted
Not applicable

How to only load previously loaded data from second SQL query.

hi,

why you don;t include the first SQL query to the second one, sth like:

SELECT
a."Document No_",
a."Line No_"
FROM "Detailed Ledger Entry" a
join Ledger Entry" b on a."Document No_" and b."Document No_"
where b."Posting Date" >= '1.1.2009'

The other option is to use exists in the second SQL query, more info about SQL exists:

http://www.techonthenet.com/sql/exists.php

Regards

Karol