1 Reply Latest reply: May 8, 2018 7:21 PM by Mark Perreault RSS

    Using a Separate File to Control Filtering

    Mark Perreault

      Hi All,

       

      I have created a QVD which is to be used by a series of end user's who at times will need to apply Where Clauses for 20+ values on a particular ID field.  I am trying to think of a way to allow them to do this without writing out a long Where (MATCH,ID,'1',....'20').  My initial idea was at the same time the QVD is created I created a CSV file with all values for the ID field and 'N' as Include.  See below

       

      Export:

      Load *
      Resident test;

      Drop table test;

       

      Store Export [file.qvd] (qvd);

       

      NoConcatenate
      ID_Filters:
      Load Distinct

      ID,

      'N' as Include

      Resident Export;

      Drop table Export;

      Store ID_Filters into [file.csv] (txt);

       

      This would allow End User to open the CSV file and for the ID's they want to include set the value to Y then when loading the QVD they would do.

       

      Table1:

      Load *
      From File.qvd(qvd);

       

      Inner Join(Table1)

      Load *
      From file.csv

      Where Include  = 'Y';

       

      The problem I am having is when I open the csv file in Exel and make any changes then save the CSV file it becomes one column.

       

      Does anyone have any other ideas of how to accomplish what I am trying to do?

       

      Thanks,
      Mark