Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Use SQL in loading tables

Hello

I got a main data set that i need to link to our organisational structure. The data I got only concerns a subset of the organisation data. What i want is to only load the organisation data that concerns the main data.

In SQL this would be easy with the following statement. Assuming I´ve got 2 tables main_data and org_data.

SELECT * FROM main.data

WHERE main_data.orgcodes == org_data.codes;

How do i do this in qlikview? The data comes from two different sources, thus accessed by two different connect-statements.

Regards

Jonas

1 Solution

Accepted Solutions
martin59
Specialist II
Specialist II

Hi,

MainTable:
LOAD DISTINCT codes as ORG_CODES;
SQL SELECT codes FROM org_data;
INNER JOIN (MainTable)
LOAD orgcodes as ORG_CODES,
field1,
field2,
...;
SQL SELECT * FROM main_data;


Hope that helps you

View solution in original post

2 Replies
martin59
Specialist II
Specialist II

Hi,

MainTable:
LOAD DISTINCT codes as ORG_CODES;
SQL SELECT codes FROM org_data;
INNER JOIN (MainTable)
LOAD orgcodes as ORG_CODES,
field1,
field2,
...;
SQL SELECT * FROM main_data;


Hope that helps you

Not applicable
Author

Thanks alot, that did the work perfectly!

Had a smillar solution but tried to give new names to the joined tables. Did not know that the join concatenated on the previous table.

Again, thank you.