Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Can any one please explain how to store two QVDs into one QVD

Can any one please explain how to store two QVDs( i already created) into one QVD, i have common column, can any oe give me the syntax.

Thanks

9 Replies
Not applicable
Author

Hi,

You could try someting like what you see on this example:

OfficeLocations:
LOAD Country//Common Field
Region,
City,
[Business Unit],
[Office Name],
Suma
FROM
Offices.qvd
(
qvd);

Left Join

LOAD Country, //Common Field
[Official Long Form],
[ISO Code],
[ISO Short],
[ISO Long],
[UN Code],
[Capital/Major City]
FROM
ISOMaps.qvd
(
qvd);

STORE OfficeLocations into OfficeLocations.qvd (qvd);


Hope it helps!

Marcio_Campestrini
Specialist
Specialist

Hi!

According the case you can use Concatenate:

[aa]:

Load * From a.qvd;

Concatenate

Load * From b.qvd;

Store aa Into aa.qvd.

Hope it helps.

Márcio.

Márcio Rodrigo Campestrini
SunilChauhan
Champion II
Champion II

if you have common columns then you need to identify

the master and transaction table

for example

Emp table and Emp detail

then

emp table

left join

Emp Details.

and if totally diffrent  field/columns

you could combile

emp table

concatenate

inventory table

hope this helps

Sunil Chauhan
Not applicable
Author

Load * , 1 as flag From a.qvd;

Concatenate

Load * , 2 as flag From b.qvd;

So when you need to get data from 'a' QVD , you can use flag filter .

aveeeeeee7en
Specialist III
Specialist III

Depending upon your requirement join 2 Tables:

1) You can use Concatenate() Function between two tables:

ABC:

Load

Name,

Place,

Area,

'ABC' AS FLAG

FROM TABLE1

CONCATENATE(ABC)

XYZ:

Load

Name,

Place,

Area,

'XYZ' AS FLAG

FROM TABLE2

STORE ABC Into C:\.......\Table_Name_You_Want_to_Use.qvd(qvd);

2) You can use Left join based on your Primary Key:

ABC:

Load

Name, // Primary Key

Place,

Area,

FROM TABLE1

Left Join

XYZ:

Load

Name,  // Primary Key

Place AS Place_XYZ,

Area AS Area_XYZ

FROM TABLE2

STORE ABC Into C:\.......\Table_Name_You_Want_to_Use.qvd(qvd);

Regards

Aviral Nag

Not applicable
Author

Hello Jose,

Thanks for the quick response

I tried it, but my system hanged

SunilChauhan
Champion II
Champion II

try loading using

distinct after each load in script

Sunil Chauhan
sibideepak
Creator II
Creator II

Hi,

what is the purpose of storing multiple Qvds into a single qvd ??

Not applicable
Author

Joins can be very costly on the machine's resources.

You could try unsing Mapping Load instead. It's a lot faster and taxes resources a lot less. In order to use this function you whould have to create as many mappings as fields you want to add to the resulting table.

Take a look at this example of mapping load:

http://community.qlik.com/blogs/qlikviewdesignblog/2013/12/13/mapping-and-not-the-geographical-kind