Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI, I have got a table like with this kind of structure.
Field | Valor |
ParamA | Valor1 |
ParamA | Valor2 |
ParamB | Valor3 |
ParamB | Valor4 |
I would like to load like this table:
ParamA | ParamB |
Valor1 | Valor2 |
Valor2 | Valor4 |
It seems I have to use a Transpose or a crosstable or both... I cannot find a way to do this.
Someone already to pass though it?
Thanks,
Eva
Are there many different parameters?
If not you can load the values from the first table.
F.i., let's call the first table tmp_table
You can Load the other tables like this.
ParamA:
LOAD Valor
Resident tmp_table
where Field = paramA
ParamB:
LOAD Valor
Resident tmp_table
where Field = paramB
I hope it helps.
Luiz
Input:
LOAD * INLINE [
Field, Valor
ParamA, Valor1
ParamA, Valor2
ParamB, Valor3
ParamB, Valor4
];
Result:
Load Valor as ParamA, RowNo() as Dummy
Resident Input where Field = 'ParamA';
join
Load Valor as ParamB, RowNo() as Dummy
Resident Input where Field = 'ParamB';
drop field Dummy;
My issue is. I don't know how many parameters I need to take.
In Microsoft they named it Pivot function.
Do you use to do generic often. I would like to try to do a generic loading.
(My husband doing that on MS, and we would like challenge QV on it.)
Anyway, thanks a lot for your answers guys !! It was really helpfull.