Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Edited by Community Team member:
Please post in English unless posting in a language specific section.
Topic translated by Google translate.
---
I'm trying to loop inside a load, have a parameter in my file that makes a count, where the field is filled only once.
Ex. trecho | Valor | Nºdocumento
xyz 1 123456
sdf 2
gfs 3
ert 4
yui 1 654321
bnk 2
I need when consuming fill in the number of document 123456 for the other lines, I tried to use the peek, but I need to loop considering the value field to fill the equivalent, for which the line below, I can only have two, as this example.
can anybody help me?
like this?
S:
load rowno() as id, * inline [
trecho | Valor | Nºdocumento
xyz | 1 | 123456
sdf | 2 |
gfs | 3 |
ert | 4 |
yui | 1 | 654321
bnk | 2 |
] (delimiter is '|');
S1:
NoConcatenate load
trecho,
Valor,
alt(Nºdocumento, Peek('Nºdocumento')) as Nºdocumento
Resident S
order by id;
DROP Table S;
like this?
S:
load rowno() as id, * inline [
trecho | Valor | Nºdocumento
xyz | 1 | 123456
sdf | 2 |
gfs | 3 |
ert | 4 |
yui | 1 | 654321
bnk | 2 |
] (delimiter is '|');
S1:
NoConcatenate load
trecho,
Valor,
alt(Nºdocumento, Peek('Nºdocumento')) as Nºdocumento
Resident S
order by id;
DROP Table S;