Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How to achieve children column from below data using SQL function not hierarchy function pf QLikview
fac_id | parent_id | root_id | children | |
4 | ABC1051458 | LIM1001308 | LIM1001307 | [ABC1051458, ABC11001309, ABC1371459] |
6 | ABC11001309 | LIM1001308 | LIM1001307 | [ABC1051458, ABC11001309, ABC1371459] |
8 | ABC1371459 | LIM1001308 | LIM1001307 | [ABC1051458, ABC11001309, ABC1371459] |
Try this..
Data:
LOAD * INLINE [
Row, fac_id, parent_id, root_id
4, ABC1051458, LIM1001308, LIM1001307
6, ABC11001309, LIM1001308, LIM1001307
8, ABC1371459, LIM1001308, LIM1001307
];
left join
LOAD Concat(fac_id, ',') as Children,
parent_id
resident
Data group by parent_id;
Try this..
Data:
LOAD * INLINE [
Row, fac_id, parent_id, root_id
4, ABC1051458, LIM1001308, LIM1001307
6, ABC11001309, LIM1001308, LIM1001307
8, ABC1371459, LIM1001308, LIM1001307
];
left join
LOAD Concat(fac_id, ',') as Children,
parent_id
resident
Data group by parent_id;
Thankyou so much for provide quick and correct response