Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Multiple databases connect for dashboard

Hi,

I am creating dashboard from two databases, I created ODBC connection for one DB and its connected fine. I pulled table called Master.

In the second tab, I connected another ODBC connection for another DB and its connected fine. I would like to pull the same table called Master.

And wanted to union these two tables as both tables same kind of fields, First of all is it possible to do that? How can I find the Master is coming from first DB or second DB.

Pls let me know your valuable inputs.

Thanks,

14 Replies
Clever_Anjos
Employee
Employee

Possible and common.

Just be carefull about field names (Case sensitive).

If two tables share the same fields, QlikView will concatenate them

Clever_Anjos
Employee
Employee

To identify where data came from

ODBC CONNECT <STRING1>

LOAD

     Field1,

     Field2,

     ...,

    'Base1' as Source;

SQL Select * from Master;

ODBC CONNECT <STRING2>

LOAD

     Field1,

     Field2,

     ...,

    'Base2' as Source;

SQL Select * from Master;

Not applicable
Author

ODBC CONNECT TO MTR (XUserId is yyyyy, XPassword is yyyyy);

SQL SELECT *

FROM "Master";

CONCATENATE

ODBC CONNECT TO BTR (XUserId is xxxxxxxx, XPassword is xxxxx);

SQL SELECT *

FROM "Master";

Is this doing correct?? And I don't have db connectivity and not able to bring only required fields from the two ODBC connections. Not sure where can I select the required fields from these two ODBC.

I want rename table names as well?

pls suggest.

Thanks

maxgro
MVP
MVP

try this

ODBC CONNECT TO MTR (XUserId is yyyyy, XPassword is yyyyy);

NewTableName:

SQL SELECT *

FROM "Master";

ODBC CONNECT TO BTR (XUserId is xxxxxxxx, XPassword is xxxxx);

CONCATENATE (NewTableName)

SQL SELECT *

FROM "Master";

LOAD data into QlikView

Not applicable
Author

Thanks Grossi,

How about the field names, is there any option where we can select required fields??

Thanks,

jagan
Partner - Champion III
Partner - Champion III

Hi Madhu,

Instead of using * in select queries specify the name of the fields you required to load.

ODBC CONNECT TO MTR (XUserId is yyyyy, XPassword is yyyyy);

NewTableName:

SQL SELECT

Field1,

Field2,

'

'

'

'

FROM "Master";

ODBC CONNECT TO BTR (XUserId is xxxxxxxx, XPassword is xxxxx);

CONCATENATE (NewTableName)

SQL SELECT

Field1,

Field2,

'

'

'

'

FROM "Master";

Hope this helps you.

Regards,

Jagan.

SunilChauhan
Champion II
Champion II

use preceeding load while fetchin frm db and remove fields which are not reuired after fetching code into qlikview

example below

Load

a,

b

c;

sql select *

from db

you can delete C

and load like below

load

a,b;

sql select * from db

hope this helps

Sunil Chauhan
Not applicable
Author

I don't have database permission to check that and not able to selecting fields in the script.

Thanks,

jagan
Partner - Champion III
Partner - Champion III

Hi Madhu,

Click on Select button in Edit Script window, there you can select the required table and columns in the popup.

Regards,

Jagan.