Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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!
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
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
Thank you, I havent noticed that.