9 Replies Latest reply: Sep 27, 2014 12:54 PM by anbu cheliyan RSS

    Use of field values in Where in SQL

    John Cahill



      I am pulling data from two data sources into one QVD file. Is there a way to use values from data source one in the Where In clause of the SQL for data source 2?

      Clearly very wrong, but this is how I envision it working. However enlighten me if there is a better way.



      Load Distinct ID from t1.qvd;

      Let vIDs =  ID;

      Drop Table T1;




      Select ID, Name from mytable Where ID in ($(vIDs);

      Store T2 into t2.qvd (qvd);

      Drop Table T2;


      Thank you,