Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
I have the following table (xls.) as an input:
| System | Variant |
| A | 11 |
| A | 12 |
| A | 13 |
| B | 21 |
| B | 22 |
| B | 23 |
| C | 31 |
| C | 32 |
| C | 33 |
I want to import those fields separetly and named:
Fields:
| A_Variants |
| 11 |
| 12 |
| 13 |
| B_Variants |
| 21 |
| 22 |
| 23 |
| C_Variants |
| 31 |
| 32 |
| 33 |
Any help please?
Thanks in advance.
Maye be like this:
Data:
LOAD * INLINE [
System, Variant
A, 11
A, 12
A, 13
B, 21
B, 22
B, 23
C, 31
C, 32
C, 33
];
Tmp:
load distinct System as SysTmp resident Data;
FOR Each a in FieldValueList('SysTmp')
LOAD Variant as '$(a)_Variant' resident Data where System='$(a)';
NEXT a
drop table Data,Tmp;output:
Maye be like this:
Data:
LOAD * INLINE [
System, Variant
A, 11
A, 12
A, 13
B, 21
B, 22
B, 23
C, 31
C, 32
C, 33
];
Tmp:
load distinct System as SysTmp resident Data;
FOR Each a in FieldValueList('SysTmp')
LOAD Variant as '$(a)_Variant' resident Data where System='$(a)';
NEXT a
drop table Data,Tmp;output: