Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
I am trying to create a hierarchy with child and parent nodes. But the Path is not creating.
Could you please help.
Thanks.
Your root nodes should be listed as child without a parent, e.g. by using
BOM:
LOAD BOM_ASSEMBLY_PRODUCT,
BOM_COMPONENT_PRODUCT,
BOM_PARENT,
BOM_CHILD,
BOM_QTY_COMPONENT
FROM
[BOM_QVD.QVD]
(qvd);CONCATENATE (BOM)
LOAD BOM_PARENT as BOM_CHILD,
NULL() as BOM_PARENT,
BOM_ASSEMBLY_PRODUCT as BOM_COMPONENT_PRODUCT
RESIDENT BOM WHERE NOT EXISTS(BOM_CHILD,BOM_PARENT);BOM_HIER:
Hierarchy (BOM_CHILD, BOM_ASSEMBLY, BOM_COMPONENT, BomAssemblyName,BOM_COMPONENT, Path, '/', Depth)
//Hierarchy (BOM_CHILD, BOM_ASSEMBLY, BOM_COMPONENT, [ParentName], [PathSource], [PathName], '/', [Depth])
LOAD
BOM_CHILD,
BOM_CHILD AS BOM_COMPONENT,
BOM_PARENT AS BOM_ASSEMBLY
RESIDENT BOM;
Your root nodes should be listed as child without a parent, e.g. by using
BOM:
LOAD BOM_ASSEMBLY_PRODUCT,
BOM_COMPONENT_PRODUCT,
BOM_PARENT,
BOM_CHILD,
BOM_QTY_COMPONENT
FROM
[BOM_QVD.QVD]
(qvd);CONCATENATE (BOM)
LOAD BOM_PARENT as BOM_CHILD,
NULL() as BOM_PARENT,
BOM_ASSEMBLY_PRODUCT as BOM_COMPONENT_PRODUCT
RESIDENT BOM WHERE NOT EXISTS(BOM_CHILD,BOM_PARENT);BOM_HIER:
Hierarchy (BOM_CHILD, BOM_ASSEMBLY, BOM_COMPONENT, BomAssemblyName,BOM_COMPONENT, Path, '/', Depth)
//Hierarchy (BOM_CHILD, BOM_ASSEMBLY, BOM_COMPONENT, [ParentName], [PathSource], [PathName], '/', [Depth])
LOAD
BOM_CHILD,
BOM_CHILD AS BOM_COMPONENT,
BOM_PARENT AS BOM_ASSEMBLY
RESIDENT BOM;
Thanks