Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have this table:
I want the second with distinct "cliente" for giro in the columns...
thank's
Try this:
Table:
LOAD * INLINE [
Giro, Cliente
A, 1
A, 2
A, 2
A, 3
A, 3
B, 4
B, 5
B, 6
C, 7
C, 7
C, 8
];
Table1:
LOAD Giro,
SubField(XYZ, ',', 1) as Cli_1,
SubField(XYZ, ',', 2) as Cli_2,
SubField(XYZ, ',', 3) as Cli_3;
LOAD Giro,
Concat(DISTINCT Cliente, ',') as XYZ
Resident Table
Group By Giro;
DROP Table Table;
Output in a table box object:
HTH
Best,
Sunny
T1:
LOAD distinct * INLINE [
Giro, Cliente
A, 1
A, 2
A, 2
A, 3
A, 3
B, 4
B, 5
B, 6
C, 7
C, 7
C, 8
];
T2:
load Giro, Cliente, NewField, 'Cliente_' & NewField as NewField2;
load if(Peek(Giro)<>Giro, 1, Peek(NewField)+1) as NewField,
Giro, Cliente
Resident T1
order by Giro, Cliente;
DROP Field NewField;
DROP Table T1;
Thank you,
it is a good solution but I have the problem that I don't know the number of different "Cliente" for each "Giro".....