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

How can I Join Two SQL loads?

Hi QV users,

I have two SQL'S and I want to join them. One is Labor and other is Material. When I debug it the system gives no failure. But when I do a Total RELOAD the system does not respond anymore After it reloaded the data. I have created the following script. Could someone help me with this issue.

----------------------------------------------------------------------

(Labor)

SQL select *

from ....

--------------------------------------------------------------------

(Temp.Material)

SQL select

JOB_Number,

EXTENDED_TOTAL

From......

---------------------------------------------------------------------------------

(Material)

Join (Labor) Load

JOB_Number,

EXTENDED_TOTAL

Resident Temp.Material;

Drop table Temp.Material;

Regards,

Aissam

7 Replies
Not applicable
Author

Hello Aissam,

I would join the tables like this:


Labor:
LOAD *;
SQL SELECT *
FROM LABOR;
LEFT Join (Labor)
LOAD
JOB_Number,
EXTENDED_TOTAL;
SQL SELECT *
FROM MATERIAL;


Make Sure JOB_Number exists in the Labor table. Good luck!

regards Mark

sathishkumar_go
Partner - Specialist
Partner - Specialist

Hi

u can use left join or concatenate for joining tables

rbecher
MVP
MVP

Hi Aissam,

why not joining the tables on database level in the SELECT statement itself?

Ralf

Astrato.io Head of R&D
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

First, I'd agree with Ralph - you are probably better off joinging the data on the database.

Second, I'm afraid one of the two happened - either you don't have an identical key field in both tables, or on the contrary, you have more than one identical field, and QlikView is creating a synthetic key. To verify it, run "limited load" under a debugger and examine your table structure.

Oleg

Not applicable
Author

Hi Guys,

Thanks for your respond. I have used the debugger and there are no identical fields besides JOB_NUMBER. Could it be possible that I have created to much data.

Joining the tables on database level is not possible due to ........

regards,

Aissam

Not applicable
Author

Can you dump a sample of your raw data (the output from the sql queries into text files and attach them. Aslo include your attempted load script.

Not applicable
Author

HI,

Problem solved. We had a date range but this did not work at first, so the system loaded all the data, so that made QV go into cardiac arrest Smile Smile.

Regards and thanks for the tips.

Aissam