Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
qliknerd
Contributor III
Contributor III

Best way to pull data in from the same table

Hi there

I have a question on what the best way to pull data into QV is. I have 4 tables I need to bring in, e.g. 2 of them are common and 2 unique:

At the moment I am pulling the data in via OLDDB queries.

A number of queries reuse the same SQL.

Currently, I left join to other tables to get the data I need.

To reduce the calls on the db, is there an easier way to do this? I would like to run the queries for Table2_tmp and Table3_tmp once, and left join when I need them.

Any help/advice gratefully received!

Table1_tmp:
SQL SELECT * FROM Table1;

LEFT JOIN (Table1_tmp)
Table2_tmp:
SQL SELECT * FROM Table2;

LEFT JOIN (Table1_tmp)
Table3_tmp:
SQL SELECT * FROM Table3;

MASTER:
LOAD *
RESIDENT Table1_tmp;
DROP TABLE Table1_tmp;

Table4_tmp:
SQL SELECT * FROM Table4;

LEFT JOIN (Table1_tmp)
Table2_tmp:
SQL SELECT * FROM Table2;

LEFT JOIN (Table1_tmp)
Table3_tmp:
SQL SELECT * FROM Table3;

CONCATENATE (MASTER)
LOAD *
RESIDENT Table4_tmp;
DROP TABLE Table4_tmp;

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Have you considered using a QVD layer? That means, query your DB to retrieve table1 to table4, storing each in a qvd and then load the QVDs for your JOINs?

View solution in original post

3 Replies
swuehl
MVP
MVP

Have you considered using a QVD layer? That means, query your DB to retrieve table1 to table4, storing each in a qvd and then load the QVDs for your JOINs?

Not applicable

Use QVD's or Resident Load instead of direct data base loading

qliknerd
Contributor III
Contributor III
Author

Thanks, I have seen the light and am intending to move to a 3-tier architecture. The more I develop and use QlikView, the better it gets 😉