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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Multiple Data Sources

Hi guys,

Please tell me,when we pull data from SAP to Qlikview,we use a SAPConnector and thus its connection string.

Similiarly,When we pull data from an Oracle table, we use an OLEBDB Connector and thus its connector string.

Please tell me,can we have both these in the same generator file?

What I mean is: Would both connection strings conflict?

How can we achieve both connection strings in the same file?

Rochelle

3 Replies
jagan
Partner - Champion III
Partner - Champion III

Hi,

You can use any number of datasources in one single Qlikview file, please check below script

ODBC CONNECT TO OraDatabase;

SELECT *

FROM Products;

CONNECT TO SAPData;

SELECT

* FROM Transactions;

Initially, Products data are loaded using first connection string, and when the second connection string is opened the first will automatically close. Now Transactions data is loaded using second connection string.

This way, there is no connection string conflict.  At a time there is only one open connection string.

Regards,

Jagan.

Peter_Cammaert
Partner - Champion III
Partner - Champion III

As Jagan says, only one active data connection at a time. But you can open any number of connections in sequence.

A good practice is to separate each data transfer from a different source in a different script file, and "$(include)" them in the order you want. SAPConnector transfer scripts tend to become very long because of the large number of fields, and mixing things may lead to mistakes.

BTW QlikView also has a statement for closing the current connection:

DISCONNECT;

Best,

Peter

Peter_Cammaert
Partner - Champion III
Partner - Champion III

If this feedback was satisfactory, please close the discussion by marking a post as Answer. That makes it easier for us to track unanswered questions.

Thanks,

Peter