Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
tmumaw
Specialist II
Specialist II

Hierarchy Question

Hi Group,

Need your help with a hierarchy issue.  Keep getting load error.  Says invalid load.

KNVH: // Customer Hierarchies
Load
//DATAB & HITYP & KUNNR & MANDT & SPART & VKORG & VTWEG AS %KEY_KNVH_DATAB_HITYP_KUNNR_MANDT_SPART_VKORG_VTWEG,
[HITYP] as [CustHType_HITYP.KNVH],
[KUNNR] as [Customer],
[VKORG] as [Sales org._VKORG.KNVH],
[VTWEG] as [Distr. Chl_VTWEG.KNVH],
[SPART] as [Division_SPART.KNVH],
[DATAB] as [Valid from_DATAB.KNVH],
[DATBI] as [Valid to_DATBI.KNVH],
[HKUNNR] as [HgLvCust],
[HVKORG] as [HgLvSlsOrg_HVKORG.KNVH],
[HVTWEG] as [HLDstrCh_HVTWEG.KNVH],
[HSPART] as [HgLvDivis._HSPART.KNVH],
[GRPNO] as [Routine_GRPNO.KNVH],
[BOKRE] as [Rebate_BOKRE.KNVH],
[PRFRE] as [Price det._PRFRE.KNVH],
[HZUOR] as [HierAssign];
SQL Select DATAB DATBI VKORG VTWEG SPART HITYP KUNNR PRFRE BOKRE HZUOR HKUNNR GRPNO HVKORG HVTWEG HSPART from KNVH
;
//STORE * FROM [KNVH] INTO ..QVD/KNVH.QVD;

//DROP TABLE [KNVH];

ExpandedCustomers:
Hierarchy(Customer, HgLvCust, Level)
LOAD
Customer AS NodeIDKunnr, //NodeID
HgLvCust AS ParentKunnr, //ParentID
HierAssign AS Level
RESIDENT
KNVH
;
Drop Table KNVH
;
Exit SCRIPT;

 

Labels (1)
  • logic

1 Solution

Accepted Solutions
jwjackso
Specialist III
Specialist III

Customer and HgLvCust have been renamed in the load statement.

 

Hierarchy(Customer, HgLvCust, Level)
LOAD
Customer AS NodeIDKunnr, //NodeID
HgLvCust AS ParentKunnr, //ParentID
HierAssign AS Level
RESIDENT
KNVH

View solution in original post

3 Replies
jwjackso
Specialist III
Specialist III

Customer and HgLvCust have been renamed in the load statement.

 

Hierarchy(Customer, HgLvCust, Level)
LOAD
Customer AS NodeIDKunnr, //NodeID
HgLvCust AS ParentKunnr, //ParentID
HierAssign AS Level
RESIDENT
KNVH

tmumaw
Specialist II
Specialist II
Author

Still getting this error:

Unknown LOAD statment error
ExpandedCustomers:
Hierarchy(Customer, HgLvCust, Level)
LOAD
Customer AS NodeIDKunnr,
HgLvCust AS ParentKunnr,
HierAssign AS Level
RESIDENT
KNVH

tmumaw
Specialist II
Specialist II
Author

Here is some sample data