Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Not applicable

multiple databases with same tables

i can't do this?

connect site1

load table1

load table2

...more tables...

connect site2

concatenate table1

concatenate table2

...more tables...

and so on...

jsn
Honored Contributor

multiple databases with same tables

Sure you can

Not applicable

multiple databases with same tables

but im getting suffixes adding on to the concatenated tables when i connect to a database once to retrieve all the tables and then the next database instead of repeatedly connect to the databases for the next table...

table.fieldA

table.fieldB

table-1.fieldA

table-2.fieldB

for kris' example, he consantly connects to the database to simulate multiple databases

jsn
Honored Contributor

multiple databases with same tables

So what does your script look like then? Could you paste the doc here?

nagaiank
Valued Contributor III

Re: multiple databases with same tables

You do not need to connect to the database for each table.

Connect to Site1 database

// load tables

table1:

...

table2:

..

Then connect to site2 database

load tables

Hope this helps.

Not applicable

multiple databases with same tables

thanks to kris, johannes and nick i have managed to get what i wanted

it was actually my qualify/unqualify statements that were causing the suffixes to be appended instead of concatenating to the tables...

Not applicable

multiple databases with same tables

ahhhhh now i got another problem

i wasn't joining all tables yet when i removed the qualify/unqualify statements

i was only joining tables with 2 similar columns

but once i started joining the other tables which were similar but site-specific i will be stuck at the loading script window...

Partner
Partner

multiple databases with same tables

why are you using join and not concatenate ?

nagaiank
Valued Contributor III

multiple databases with same tables

For any table, if there are site-specific fields in addition to common fields, you need to define all the fields of a table before you start loading from the sites. For example,

Common fields of all sites: Com1, Com2, Com3

Site1-specific fields: Site1a, Site1b

Site2-specific fields; Site2a, Site2b

Define all fileds of the Table1 using the script

Table1:

LOAD * Inline [

Com1, Com2, Com3, Site1a, Sit1b, Site2a, Site2b

];

Connect to Site0 and load data

Concatenate (Table1) LOAD * From Table1

Connect to Site1 and load data

Concatenate (Table1) LOAD * From Table1

...

Hope this helps.