Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Multiple file load wither inner join

Hello,

I have tried to load from multiple files 3 tables, which I wanted to concatenate. So I've used the Load From [Path\*.xlsx] (all my files ae xlsx and in the same folder).

Rapport1:

LOAD *

FROM [pahtfield*.xlsx](ooxml, embedded labels, table is [Rapport 1]);

inner join (Rapport1)   

LOAD *

FROM

[pathfield\*.xlsx]

(ooxml, embedded labels, table is [Rapport 2]);

But I had no data loaded

Any one can help my with this?

Thank you

10 Replies
Not applicable

Re: Multiple file load wither inner join

May be both the files doesn't have common data. You are using Inner Join.

Regards,

KKR

mov
Esteemed Contributor III

Re: Multiple file load wither inner join

When you use inner join, the resulting table contains the records that have common values in their key fields.  Since you're using *, we cannot see if there are key fields at all.  And, if there are - they don't have matching values.

MVP
MVP

Re: Multiple file load wither inner join

First load your two tables from your sources, then do the inner join in a resident load. Then drop the temporary second table:

RAP1:

LOAD * FROM ...;

RAP2:

LOAD * FROM ...;

INNER JOIN (RAP1) LOAD * RESIDENT RAP2;

DROP TABLE RAP2;

Not applicable

Re: Multiple file load wither inner join

No, I am sure the have common date, when I used only one file it worked, but when i used the path\*.xlsx it didn't

MVP
MVP

Re: Multiple file load wither inner join

you said concatenate

wanted to concatenate

and in the script you used join

do you want to concatenate or join?

maybe this can help to choose

Re: Uses for Left Join and Concatenate in tables?

MVP
MVP

Re: Multiple file load wither inner join

That's because the JOIN will be performed after each file has been loaded, not after concatenating all files.

If the Key values are exclusive in the files, you'll end up with a empty set.

Not applicable

Re: Multiple file load wither inner join

that is exactly what happening to me. I want to first concatenate the sheets from the files and then join them

Image1.png

MVP
MVP

Re: Multiple file load wither inner join

Have you tried what I suggested above (First LOAD the two tables, then JOIN the resident tables)?

Not applicable

Re: Multiple file load wither inner join

I don't know how the script two merge to resident tables, can u give me a sample of script please?

Community Browser