1 Reply Latest reply: Mar 20, 2012 3:11 PM by Erich Shiino RSS

    Problem with "where" command in load script

      SUB DoDir (Root)
      FOR each File in filelist(Root& '\*HOSTTRNAI.TXT')
      LOAD 'HOSTTRNAI.TXT' as source1,
      date(date#(right(filedir(),6),'DDMMYY'),'DD MMM YYYY') as Filename2,
      Where date(date#(right(filedir(),6),'DDMMYY'),'DD MMM YYYY'>='01 Mar 2012'
      FROM [$(File)] (txt, codepage is 1252, embedded labels, delimiter is ',', msq);
      NEXT File
      FOR each Dir in dirlist (Root&'\*')
      CALL DoDir(Dir)
      NEXT Dir
      END SUB
      CALL DoDir('S:\Filepath\Mar 12')
      //This takes all the files ending in HOSTTRANAI.txt, in the folder and subfolders of"Mar 12" and grabs the data from them which is then put into a table,.  Each file is in a 
       //subfolder named
       //DDMMYY as such this is a new field in the table.  I would like to be able to use the line in bold to choose which files to grab, but my knowledge of the where command
       i//is lacking.
       Help would be appreciated.