Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Hierarchy load, NodeName has to be the same as one of the IDs

Hello everyone,


Last time my question stayed unsolved, hope not this time


Down there is a database table, all columns shown:

Serie1 + Num1 + Id1 are columns concatnated as an ID for contract code. (CONCAT(Serie1, '/', Num1, '/', Id1) AS Parent)

Serie2 + Num2 + Id2 are columns concatnated as an ID for another document. (CONCAT(Serie2, '/', Num2, '/', Id2)  AS Son)

Those two IDs are in parent-son relationship and also the only ID I have to join it with other tables and very important information I want to make the hierarchy tree about 5 levels.

I have tried this in QlikView:

[RP]:

LOAD

    Parent     AS id_parent,

    Son AS id_son,

    Son    AS Descr;

SQL

SELECT

    CONCAT(Serie1, '/', Num1, '/', Id1) AS Parent,

    CONCAT(Serie2, '/', Num2, '/', Id2)  AS Son

FROM [JCBINDS]

WHERE Serie2<>'VO';


UNQUALIFY *;


[Tree]:

HIERARCHY(id_son, id_parent, Descr)

LOAD

    id_parent,

    id_son,

    RP.Descr

Resident [RP];


But an error appears telling that NodeName is not a valid field! (when using resident load; ODBC error when trying to make hierarchy straight from the first table. RP-NodeList table was made, then it crashed.)


Wanted output is tree with IDs like: 20/2015/1 - VP/2015/16598 - VP/2015/36577.... and so on...


Thank you!


1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

I suggest you remove the "Qualify" statement that you have. You have a mismatch in field names marked in red:

[Tree]:

HIERARCHY(id_son, id_parent, Descr)

LOAD

    id_parent,

    id_son,

    RP.Descr

Resident [RP];


HIC

View solution in original post

2 Replies
hic
Former Employee
Former Employee

I suggest you remove the "Qualify" statement that you have. You have a mismatch in field names marked in red:

[Tree]:

HIERARCHY(id_son, id_parent, Descr)

LOAD

    id_parent,

    id_son,

    RP.Descr

Resident [RP];


HIC

Not applicable
Author

Thank you, I havent noticed that.