4 Replies Latest reply: Nov 17, 2017 3:18 AM by souad ouertani RSS

    applymap

    souad ouertani

      REF_ENTITY:

      LOAD ID ,

           AREA,

         

          upper(Replace(NAME,'DIR. REGION.','DIRECTION REGIONALE')) AS Libellé,

           DEPT_LEVEL,

           DEPT_PARENT as code_entité_mère

          

      FROM

      [C:\Users\90160\Desktop\Vison360\entité\Classeur2.xlsx]

      (ooxml, embedded labels, table is Feuil1)

      where

      /*exists(ENTITE, upper(Replace(NAME,'DIR. REGION.','DIRECTION REGIONALE'))) */

      (DEPT_LEVEL='40' and DEPT_PARENT='506')or DEPT_LEVEL='80' or DEPT_LEVEL='90' or ID=506 or ID=500 ;

       

       

      REF_Final:

      load

        ID,

         upper(Replace(NAME,'DIR. REGION.','DIRECTION REGIONALE')) AS Libellé,

           DEPT_LEVEL,

           DEPT_PARENT as code_entité_mère ,

      ApplyMap('REF_ENTITY',ID,null()) as entité_mère

       

       

      FROM

      [C:\Users\90160\Desktop\Vison360\entité\Classeur2.xlsx]

      (ooxml, embedded labels, table is Feuil1)

      where

      /*exists(ENTITE, upper(Replace(NAME,'DIR. REGION.','DIRECTION REGIONALE'))) */

      (DEPT_LEVEL='40' and DEPT_PARENT='506')or DEPT_LEVEL='80' or DEPT_LEVEL='90' or ID=506 or ID=500 ;

      drop table REF_ENTITY;

       

      i need to extract the NAME of  code_entité_mère  , i tried this script but always entité_mère nul