5 Replies Latest reply: Sep 22, 2016 4:05 PM by Peter Cammaert RSS

    INNER JOIN syntax

    Robert Fishel

      Hello my fellow QV enthusiasts.  I am having a time trying to figure out how to convert the SQL query (from Teradata) below into a QlikView load script.  My issue is that one of the tables, table1, has about 100 million records in it so it isn't feasible for me to load the entire table and then do a inner join to table 2.  Any ideas as to how this could be rewritten for QlikView I would greatly appreciate.

       

       

       

      SELECT                   table1.first_name
                                      ,table1.last_name
                                      ,table1.date
                                      ,table1.birthdate        
                                                
      FROM                     TABLE_A table1
      INNER JOIN     TABLE_B table2

      ON                            table2.first_name = table1.first_name
                                      AND table2.date = table1.date       
                                      AND table1.valid = 1
                                      AND table1.expir_dt =DATE'9999-12-31'                                                       
      WHERE table2.wae_prd_dt = DATE'2016-08-01';