Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Loading multiple qvd files into one table

In my data model I am taking several qvd files created in my extract, and loading them into the same table. For some reason qlikview is creating a separate table for each qvd rather than just concatenating them onto each other. Is there a keyword that I can use in the code shown to prevent qlikview from creating multiple tables for each qvd? Thanks.

Table1:

LOAD

Field1,

Field2,

Field3

FROM

Table1\Table1_*.qvd(qvd);

Table2:

Inner Keep (Table1)

LOAD

Field1,

Field4,

Field5

FROM

Table2\Table2_*.qvd(qvd);

12 Replies
Not applicable

Re: Loading multiple qvd files into one table

concatenate

Re: Loading multiple qvd files into one table

Hi try below

Table1:

LOAD

Field1,

Field2,

Field3

FROM

Table1\Table1_*.qvd(qvd);

concatenate

Table2:

Inner Keep (Table1)

LOAD

Field1,

Field4,

Field5

FROM

Table2\Table2_*.qvd(qvd);

Modified

Hi try below

Table1:

LOAD

Field1,

Field2,

Field3

FROM

Table1\Table1_*.qvd(qvd);

concatenate (Table1)

LOAD

Field1,

Field4,

Field5

FROM

Table2\Table2_*.qvd(qvd);

Not applicable

Re: Loading multiple qvd files into one table

This is giving me an 'illegal combination of prefixes error'

Also, I am not trying to concatenate Table1 onto Table2. I just want there not to be multiple of each of these tables.

Re: Loading multiple qvd files into one table

Hi try this

Table1:

LOAD

Field1,

Field2,

Field3

FROM

Table1\Table1_*.qvd(qvd);

concatenate (Table1)

LOAD

Field1,

Field4,

Field5

FROM

Table2\Table2_*.qvd(qvd);

Regards

ASHFAQ

thornofcrowns
Valued Contributor II

Re: Loading multiple qvd files into one table

Are you trying to concatenate crosstables?

MVP
MVP

Re: Loading multiple qvd files into one table

I think you have to load all QVDs into Table2 (probalby with NoConcatenate prefix) first before you can use KEEP on Table1..

- Ralf

richard_pearce6
Valued Contributor

Re: Loading multiple qvd files into one table

Loose the 'KEEP', that keeps them as separate tables

Employee
Employee

Re: Loading multiple qvd files into one table

You can´t use a INNER KEEP (or JOIN) while using wildcards into FROM clause

Not applicable

Re: Loading multiple qvd files into one table

I think your problem should be a little better described.

One cause could be that tables dont have the same structure (field names and types...).

I dont know how exactly this way of loading with a star in file path works, but you can try different way.
Try with a loop, lists all the files, save them in a variable and then in a loop load data from these qvd-s. (just my proposal)

According to the rules, should QV automaticly concetane this tables, if the format of the tables match. 

Community Browser