4 Replies Latest reply: May 1, 2015 3:06 AM by Xavier Retaillaud RSS

    How load data in variable?

    Виталий Чуприна

      I receive 2 type of files I want to determine file type

       

      First type (1 column - Department, 2 - Customer)

      Second type (1 column - Customer).

      I try do this by following code:

       

      LOAD

      A AS SOURCE_TYPE

      FROM [$(vFile)] 

      (ooxml, no labels, header is 9 lines)

      WHERE recno() = 1

      ;

      LET ColumnName = peek('SOURCE_TYPE', 0, 'Type');

      LET FileType = WildMatch('$ColumnName','Department','Customer');

       

      But I load data only to SOURCE_TYPE and wildmatch function doesn't return value.

      Also I tried use this code, but had the same result

      Temp:

      LOAD

           A AS Type

      FROM

      [$(vFile)]

      (ooxml, no labels);

       

       

      T1:

      NoConcatenate

      LOAD concat(Type,'|') as TypeList Resident Temp;

       

       

      DROP Table Temp;

       

       

      LET vDep1 = Match (peek('TypeList'), 'Department','Customer');