Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Community!
I have a table like this:
Row | Formula |
---|---|
BS0500 | BS0510 |
BS0500 | BS0520 |
BS0510 | 240 |
BS0510 | 249 |
BS0510 | 293 |
BS0520 | 242 |
BS0520 | 295 |
And I would like to convert / expand it to this:
Header 1 | Header 2 |
---|---|
BS0500 | 240 |
BS0500 | 249 |
BS0500 | 293 |
BS0500 | 242 |
BS0500 | 295 |
BS0510 | 240 |
BS0510 | 249 |
BS0510 | 293 |
BS0520 | 242 |
BS0520 | 295 |
Any help would be highly appreciated!
Thanks in advance.
Hi, you can try this in the script -
HTH!
tab:
load * Inline [
_Row, Formula
BS0500, BS0510
BS0500, BS0520
BS0510, 240
BS0510, 249
BS0510, 293
BS0520, 242
BS0520, 295
];
Tmp:
load _Row, Formula as _F
resident tab;
left join
load
_Row as _F, Formula
Resident tab;
drop table tab;
Fnl:
load _Row as Row,
if(isnull(Formula), _F, Formula) as Formula
resident Tmp;
drop table Tmp;
Hi, you can try this in the script -
HTH!
tab:
load * Inline [
_Row, Formula
BS0500, BS0510
BS0500, BS0520
BS0510, 240
BS0510, 249
BS0510, 293
BS0520, 242
BS0520, 295
];
Tmp:
load _Row, Formula as _F
resident tab;
left join
load
_Row as _F, Formula
Resident tab;
drop table tab;
Fnl:
load _Row as Row,
if(isnull(Formula), _F, Formula) as Formula
resident Tmp;
drop table Tmp;
Thanks a lot Patrick!