Hi,
In SQL you can create a table and a loop and in the loop you add everytime a record to the same table
create table table_A
( ID. Integer,
Desc varchar
)
declare @loop int
set @loop = 1
while @loop < 10
BEGIN
Insert into table_A
Values(@loop, ‘some text’)
Set @loop = @loop + 1
END
How can I do this in Alteryx?
I played with the iteration Marco, but I can't find the option to append to the same table
Any idea how to do this?
thanks
RJ
Solved! Go to Solution.
You can do this with an iterative macro:
Basically:
- Build an initial row
- Then in the iterative macro, you build a new row. The Engine.IterationNumber will work as a Loop variable
- You then union the input to the new row (which must match exactly)
- You can use a filter to decide if to loop or not based on value of IterationNumber
Quick sample attached
Thank you very much for this.
best regards,
RJ
User | Count |
---|---|
17 | |
15 | |
15 | |
8 | |
6 |