Increment Values based on column (Looping)

I have source like this
Num, SeqNo,Ln,Qty
101, 1 ,1,5
I wanna target following below
Num,SeqNo,Ln,Qty
101, 1 , 1, 1
101, 1 , 2, 1
101, 1 , 3, 1
101, 1 , 4, 1
101, 1 , 5, 1
Based on Qty value records will be incremented.If qty value is 4 then o/p will be like below
Num,SeqNo,Ln,Qty
101, 1 , 1, 1
101, 1 , 2, 1
101, 1 , 3, 1
101, 1 , 4, 1
Please help on this. Thanks in advance.

Questions by Ram_1104

Showing Answers 1 - 3 of 3 Answers

yours i/p data

Num,SeqNum,Ln,Qty
101,1,1,5


and o/p data

Num,SeqNum,Ln,Qty
101,1,1,1
101,1,2,1
101,1,3,1
101,1,4,1
101,1,5,1

steps-

- use transformer
-define stage variable stgvar_Qty with value 1 means stgvar_Qty=1
-define loop with condition @ITERATION<=INPUTLINK.Qty
as per urs example @ITERATION<=5


- column in derivation

INPUTLINK.Num - Num
INPUTLINK.SeqNum - SeqNum
@ITERATION - Ln
stgvar_Qty - Qty

there is no need to define stgvar_Qty also , use direct value 1 for column Qty

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions