6 Replies Latest reply: May 2, 2013 8:01 AM by victor59 RSS

    Join several columns from a table with a single column in an other table

      Hi,

      I start to work with QV 2 weeks ago, and I have a problem.

      I want to join several columns from a table with a single column in an other table.

       

      Exemple :

       

      Table1:

      LOAD

      idApp,

      AppName;

      SELECT * FROM Table1;

       

      Table2:

      LOAD

      idTable2,

      idApp1,

      idApp2,

      idApp3;

      SELECT * FROM Table2;

       

      ------------------------------------------

       

      I want to join all idApp in Table2 with idApp in Table1.

      I can't modify the data base (It is a great pity !), and I can't modify the LOAD statement of Table1 because I use a loop to load a lot of table in the script,  it's a specificity of this table.

       

      I tried to use the same alias on columns when I load the Table2 (idApp1 AS idApp, idApp2 AS idApp, idApp3 AS idApp) but I think it is not possible.

       

      My only solution is to create 3 times the Table2 with different name, but I don't like it.

       

      Can someone help me ?

      Thanks