Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I would like to merge 3 differents fields into 1, just like that :
I need to keep all the values, they don't have to be distinct.
Thank you
One solution :
Input:
load *,subfield(TmpField,'_') as Result;
LOAD *,[Field 1]&'_'&[Field 2]&'_'&[Field 3] as TmpField INLINE [
Field 1, Field 2, Field 3
2, 1, 4
5, 4, 5
4, 9, 6
9, 3, 8
7, 8, 7
6, 2, 1
];
drop fields TmpField,[Field 1],[Field 2],[Field 3];
output:
@Rdouto You need to use concatenate here to have other field reference intact
Data:
load Field1 as Field,A,B,C
FROM table;
concatenate(Data)
load Field2 as Field,A,B,C
FROM table;
concatenate(Data)
load Field3 as Field,A,B,C
FROM table;
Thank you for your answers !
I tried the first proposition @Taoufiq_Zarra but the system says that he does not know the field Tmpfield. Maybe I forgot something ?
like this ?
[All forms]:
load *,subfield(TmpField,'_') as Result;
load *,[Field 1]&'_'&[Field 2]&'_'&[Field 3] as TmpField
From[lib.....
drop fields TmpField,[Field 1],[Field 2],[Field 3];