3 Replies Latest reply: Aug 16, 2017 4:24 AM by Antonio Mancini RSS

    Creating categories on load

    Avishai Zonnenberg

      hi

       

      i'm trying to create categories in the load script

      for some reason i keep getting an error message "item 'ITEMID' not found

       

      here is the script:

       

      LIB CONNECT TO [avi];

       

      [PRODTABLE]:

      LOAD ITEMID,

          PRODPOOLID;

      SQL SELECT ITEMID,

          PRODPOOLID

      FROM AXPROD.dbo.PRODTABLE;

       

       

      [מאגרים]:

      Load

      IF(PRODPOOLID=20,'metal',

          if(PRODPOOLID=30,'plastic',

          if(PRODPOOLID=32,'flow',

          if(PRODPOOLID=33,'storm',

          if(PRODPOOLID=34,'regev',

          if(PRODPOOLID=60,'pilot',

          if(PRODPOOLID=20 and WildMatch(ITEMID,'5c*'),'valve', Null())))))))

          AS [categories];

         

           SQL SELECT "PRODPOOLID"

         

      FROM "AXPROD"."dbo"."PRODTABLE";

       

      thanks.