Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good morning, I want to double a row of the loaded base depending on the amount of a field by subtracting one unit until it reaches 1, the table is as follows:
LOAD REQ.,
ID,
[BT No.],
[Certificate No.],
Product,
[Number of installments]
I want a loaded line to be duplicated if the [Number of installments]>1 and subtract the number of installments 1 until this subtraction of this field reaches 1.
thank you
maybe with iterno()
X:
load * inline [
ID, NumOf
1,1
2,2
3,3
12,2
5,5
];
Y:
load
ID, NumOf, iterno() as N
Resident X
WHILE
IterNo() <= NumOf;
DROP table X;
maybe with iterno()
X:
load * inline [
ID, NumOf
1,1
2,2
3,3
12,2
5,5
];
Y:
load
ID, NumOf, iterno() as N
Resident X
WHILE
IterNo() <= NumOf;
DROP table X;
Perfect, I applied the function and it worked for me without problems, thank you very much