4 Replies Latest reply: Mar 8, 2017 9:38 PM by vimarsh saxena RSS

    Using resident table in an ODBC connection?

    npeterso

      I am trying to load data from 2 different databases and I would like to use the results from the first database table to limint the records selected from the second database. Can I do some type of resident load? Thanks.

       

       

       

       

      ODBC CONNECT TO DATASOURCE1;

      TABLE1:

      LOAD

      VAR1,

      VAR2,

      VAR3 ;

      SQL SELECT

      C.VAR1,

      C.VAR2,

      C.VAR3

      FROM SOURCE.TABLE C

      WHERE C.VAR1 > '00000000' ;

       

       

      ODBC CONNECT TO DATASOURCE2;

      TABLE2:

      LOAD

      VAR4,

      VAR5,

      VAR6 ;

      SQL SELECT

      A.VAR4, B.VAR5, D.VAR6

      FROM RESIDENT TABLE1 C

      JOIN SOURCE.TABLEB B ON SUBSTR(B.SEQUENCE,1,10)=C.SEQUENCE

      JOIN SOURCE.TABLEA A ON A.SEQUENCE=SEQUENCE

      JOIN SOURCE.TABLEA D ON D.SEQUENCE_NUM = B.SEQUENCE_NUM

       

       

      WHERE C.VAR1 > '00000000' AND D.VAR6 IS NOT NULL ;