Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

LEFT JOIN on existing tables

I have existing List Tables: portfolio, revenue 2011, revenue 2012, revenue 2013. I wish to left join portfolio with the other 3. I want the resulting table be called RevenueByPortfolio. So I am scripting:

RevenueByPortfolio:

SELECT * FROM Portfolio ;

LEFT JOIN SELECT * FROM Revenue 2013 ;

LEFT JOIN SELECT * FROM Revenue 2012 ;

LEFT JOIN SELECT * FROM Revenue 2011 ;

First compilation error is

Connection to OBDC failed

RevenueByPortfolio:

SELECT * FROM Portfolio ;

What is RevenueByPortfolio: in my script ? I understood this is the way to name resulting table RevenueByPortfolio. How to do if not this way ?

Then, I have similar connection errors with other statements.

How to left join existing List Tables ? Would you have some full script at hands as an example to perform such thing ?

Regards

3 Replies
MK_QSL
MVP
MVP

Connection error is due to your connection failed....

Please use test connection while making ODBC connection.

Load Portfolio and Other 3 tables.

Portfolio:

Load * From TableName;

[Revenue 2013]:

Load * from Revenue2013TableName;

Concatenate

Load * from Revenue2012TableName

Concatenate

Load * From Revenue2011TableName

RevenueByPortfolio:

Left Join (Portfolio) Load * Resident [Revenue 2013];


Drop Tables Portfolio, [Revenue 2013];


Hope this help you...

Not applicable
Author

Thanks,

I think this will do. But I cannot load table that are already in the QLikView document. Loaded table with Load is sought for in the directory where the QLikView document is saved.

more precisely, i have already loaded Portfolio, Revenue2011TableName, Revenue2012TableName, Revenue2013TableName. How can I load table that are already in the document ? Should i use another combo box item as connection ODBC ?

Regards

MK_QSL
MVP
MVP

Can you please load your document with error?