Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
johnlauridsen
Contributor III
Contributor III

Two Databases (old-new) loaded into 1 Sales QV document

We have a QV sales database based on our ERP system. Its a great and vry much used tool.

This spring we updated to a newer release of the ERP system. New and empty database. The database has the same structure as the old one.

To start with I just copied the old QV sales document, renamed it, changed the ODBC and its working.

BUT of course the sales people would like to have one QV with historical data as well as new data. My question is then If anybode has a quick and great solution for this?

One solution could be to merge QVD files from the old database into the new QVD files. The old QV isn't update anymore. So it can be a one time job.

Please let me have your ideas.

John

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hi John,

It's very usual that you have some static data (say historic data, that will not be updated any longer) that I use to save in QVDs, as you did.

So in the same load, and since both old and new fields are exactly the same, you will need to do one load from the old QVDs and following to each old table, do a new LOAD of the new data. I'd keep both old and new QVDs separate, just in case you need any further development. Besides, if you are using the same fields, the code should be as easy as

UpdatedData:

LOAD ID,

     Date,

     Amount;

SQL SELECT ID, Date, Amount FROM Datasource.SourceTable;

// If the old QVD has the same exact field names, you needn't specify CONCATENATE

// nor each individual field

LOAD *

FROM OldData.qvd (qvd);

In the case above, the table UpdatedData has both new data pulled from new database as well as the old records previously stored in the QVD file.

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

View solution in original post

2 Replies
Miguel_Angel_Baeyens

Hi John,

It's very usual that you have some static data (say historic data, that will not be updated any longer) that I use to save in QVDs, as you did.

So in the same load, and since both old and new fields are exactly the same, you will need to do one load from the old QVDs and following to each old table, do a new LOAD of the new data. I'd keep both old and new QVDs separate, just in case you need any further development. Besides, if you are using the same fields, the code should be as easy as

UpdatedData:

LOAD ID,

     Date,

     Amount;

SQL SELECT ID, Date, Amount FROM Datasource.SourceTable;

// If the old QVD has the same exact field names, you needn't specify CONCATENATE

// nor each individual field

LOAD *

FROM OldData.qvd (qvd);

In the case above, the table UpdatedData has both new data pulled from new database as well as the old records previously stored in the QVD file.

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

johnlauridsen
Contributor III
Contributor III
Author

Thank you.

It worked.