9 Replies Latest reply: Jun 29, 2016 3:00 AM by Vikram Vangala RSS

    Hierarchie Issue !!!

    Amit Saini

      Hi Folks,

       

      Attached is my sample application.

       

      Script:

       

      PlantCategories:

      LOAD Plant,

           [Plant Code],

           LeadPlant,

           Region1,

           [Product Groups]

      FROM

      [C:\Users\asaini\Desktop\Book12.xlsx]

      (ooxml, embedded labels, table is Sheet1);

       

       

       

      tmp_PlantHierarchie:

      Hierarchy([Plant Code],LeadPlant, Plant, [ParentName]   )

      Load

           [Plant Code],

         LeadPlant,

           Plant 

      resident PlantCategories;

       

       

      PlantHierarchie:

      Left join (PlantCategories) load

           [Plant Code],

           Plant1 as LeadPlantName

      resident tmp_PlantHierarchie;

       

       

      drop table tmp_PlantHierarchie;

       

       

      Problem :

       

      Not sure why I'm not getting right value in "LeadPlantName" filed

       

      It should work like below based on Plant Code and LeadPlant entries:

       

       

       

      Please help!

       

      Thanks,
      AS