Watz
11/15/2022, 10:20 AMmichoel
11/15/2022, 10:25 AMbuiltin.hierarchy
function you can try your luck with. I gave it a shot a few months ago but didn't succeed in getting anything working. https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/article_161950565221.htmlmichoel
11/15/2022, 10:26 AMWatz
11/15/2022, 10:37 AMwhere SYS_CONNECT_BY_PATH(isinactive,' : ') not like('%T%')
builtin.hierarchy just seems to get the hierarchy by the name unfortunatelyWatz
11/15/2022, 10:41 AMWatz
11/15/2022, 10:43 AMSELECT name, id, parent, isinactive, BUILTIN.HIERARCHY(parent, 'SELF_DISPLAY') as path
FROM classification
This worked, but isn't what I need unfortunately.Watz
11/15/2022, 11:49 AMSELECT
C.id,
C.name,
C.parent,
C.isinactive || P1.isinactive || P2.isinactive || P3.isinactive || P4.isinactive || P5.isinactive || P6.isinactive || P7.isinactive as all,
FROM classification C
left join classification P1 ON C.parent = P1.id
left join classification P2 ON P1.parent = P2.id
left join classification P3 ON P2.parent = P3.id
left join classification P4 ON P3.parent = P4.id
left join classification P5 ON P4.parent = P5.id
left join classification P6 ON P5.parent = P6.id
left join classification P7 ON P6.parent = P7.id
WHERE (C.isinactive || P1.isinactive || P2.isinactive || P3.isinactive || P4.isinactive || P5.isinactive || P6.isinactive || P7.isinactive) not like('%T%')
Watz
11/15/2022, 12:51 PMWatz
11/15/2022, 2:28 PMWatz
11/15/2022, 2:42 PM