Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have 2 database server and i want to show data by combining from both servers. I have created 2 connection strings from both servers.
After that i had given 2 queries,
tab1:
SELECT sum(SALES),countries from Server1.SALES.DBO.YearSales(Nolock) Group by Countries;
tab2:
SELECT sum(SALES),countries from Server2.SALES.DBO.YearSales(Nolock) Group by Countries;
When i refresh i got an error invalid object name "SELECT sum(SALES),countries from Server1.SALES.DBO.YearSales(Nolock);"
Why it is happening? Difficult to find what is wrong?
One more query by adding 2 servers sales values.
Tab3:
SELECT sum(SALES),countries from Server1.SALES.DBO.YearSales(Nolock) Group by Countries;
UNION
SELECT sum(SALES),countries from Server2.SALES.DBO.YearSales(Nolock) Group by Countries;
This query is also giving error.
Can anyone help me on this.
Thanks,
Raghu.
Hi,
Qlikview takes the last mentioned connection string before executing the SQL. Try to add the first connection string and then the corresponding SQL. Then include the next connection string and corresponding SQL or place the connection strings and corresponding SQLs in seperate tabs.
-Haneesh
Haneesh,
Thanks, One more doubt, For UNION query how can i give the connection string?. Check the tab3 in the last post. For that how can i give the connection string?.
I need to use that query .
-Raghu.
Hi Raghu,
I think you need two do it in two steps.
Connection string 1;
QVTab1:
Load data from first server;
Connection string 2;
QVTab2:
Load data from second server;
QVTab3:
QVTab1
Join
QVTab2
Hope it makes sense.
Thanks,
Cyriac
You may need to CONCATENATE the two tables rather than join them.
Use the following steps:
Jonathan