Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Team,
I have multiple comma separated columns in SQL . I want to convert those columns into multiple rows. How can I achieve that in Qlik sense?
I have a separate lookup table to map those values. all I need to do is split and join with lookup table
Thanks,
Selva.
Maybe with the subfield function
// My test data; edit this part of the script to fit your table
T2:
load * inline [
F1| F2
1,2,3|1,2,3,4,5
10,20,30|100,200,0,0,0,0,0,1000
]
(delimiter is |);
// from columns to rows
T3:
LOAD
SUBFIELD(F1, ',') as C1
RESIDENT T2;
CONCATENATE (T3)
LOAD
SUBFIELD(F2, ',') as C2
RESIDENT T2;