Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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,
Possible and common.
Just be carefull about field names (Case sensitive).
If two tables share the same fields, QlikView will concatenate them
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;
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
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";
Thanks Grossi,
How about the field names, is there any option where we can select required fields??
Thanks,
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.
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
I don't have database permission to check that and not able to selecting fields in the script.
Thanks,
Hi Madhu,
Click on Select button in Edit Script window, there you can select the required table and columns in the popup.
Regards,
Jagan.