Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everybody,
I have a problem with a new definition of table.
I have this table
Tmp:
LOAD * INLINE [
Key, Value
A, 10
A, 11
B, 10
B, 11
B, 12
];
and I want to obtain this risult:
Key Value
A 10,11
B 10,11,12
Can anyone help me?
Thanks
try this
Tmp:
LOAD * INLINE [
Key, Value
A, 10
A, 11
B, 10
B, 11
B, 12
];
LOAD Key, concat(Value,',') as value_new Resident Tmp group by Key;
output like this
Key | value_new |
A | 10,11 |
B | 10,11,12 |
see attachement
Hi,
Try this.
Load Key,Concate(Value,',') as New_Value
Resident Tmp Group by Key;
Regards,
Kaushik Solanki
try this
Tmp:
LOAD * INLINE [
Key, Value
A, 10
A, 11
B, 10
B, 11
B, 12
];
LOAD Key, concat(Value,',') as value_new Resident Tmp group by Key;
output like this
Key | value_new |
A | 10,11 |
B | 10,11,12 |
see attachement
then u have to concat the value
load
key,value
,
concat(distinct value.'') as value1,
concat(distinct key .'') as key1
resident table;
Excactly.
Thanks