3 Replies Latest reply: Dec 27, 2013 12:53 AM by Manish Kachhia RSS

    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:



      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


      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 ?



        • Re: LEFT JOIN on existing tables
          Manish Kachhia

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

          Please use test connection while making ODBC connection.


          Load Portfolio and Other 3 tables.


          Load * From TableName;


          [Revenue 2013]:

          Load * from Revenue2013TableName;


          Load * from Revenue2012TableName


          Load * From Revenue2011TableName



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

          Drop Tables Portfolio, [Revenue 2013];

          Hope this help you...