Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone - I have a question related to loading data from multiple sources. Essentially I have an old database that has historical data and new database that was just created (the result of a system upgrade). The table & field names are identical in both databases - they just reside on a different sql server.
In my original load script I'm using a series of alias etc for tables, basically to facilitate a bunch of joins that I'm doing. I was hoping I could just copy the same script to another load tab and change the "from" statement to the new database name so that I can have both historical and new data in one view. When I do this the load sequence loads both data sets and then seems to just hang, - no errors or anything - it just stops. Is the problem related to the fact that i'm duplicating alias, table, and field names?
Thanks in advance!
Simon
Hello Simon,
Although the load statement would be enough to carry out what you are looking for, here is my suggestion, that is what I'm currently doing for something very similar. First, I load both databases and store them in QVD files. Then, I load both QVD (which is quite fast) in the same table.
Although for clearer code you may use the CONCATENATE keyword, it's not necessary as QlikView concatenates tables implicitly when both are loaded into the application when they have the same number of fields and same name of fields, even when the load is performed in different places of the script (unless they were dropped before, obviously).
I'd recommend you to debug your load process to see where it stops and help you to solve that problem first.
Regards.
If you are loading the historical and new data in different tables with the same field names, qlikview might tried to calculate links between both tables. In the other hand, if you load both datasources with the same table name and same structure, qlikview should be able to concatente both datasources automatically. If this process fails, you can always use the concatenate key word.
If your intention is to load historical an new data in different tables, you can use the qualify statement, in order to quickly avoid undisired link between each table.
Regards.
I would suggest that you are missing the concatenate key word.
i.e.
LOAD sys_field_name1
sys_field_name2
FROM SQL1;
CONCATENATE
LOAD sys_field_name1
sys_field_name2
FROM SQL2;
Hello Simon,
Although the load statement would be enough to carry out what you are looking for, here is my suggestion, that is what I'm currently doing for something very similar. First, I load both databases and store them in QVD files. Then, I load both QVD (which is quite fast) in the same table.
Although for clearer code you may use the CONCATENATE keyword, it's not necessary as QlikView concatenates tables implicitly when both are loaded into the application when they have the same number of fields and same name of fields, even when the load is performed in different places of the script (unless they were dropped before, obviously).
I'd recommend you to debug your load process to see where it stops and help you to solve that problem first.
Regards.