I am trying to insert new rows for each id, the number of rows should be equal to the value of a certain variable.
For example, say I have the variables ID and X1 which look like this:
ID X1
A 3
B 1
C 5
Then I want the table to be produced as this:
ID
A
A
A
B
C
C
C
C
C
So there are 3 rows for A, 1 for B, and 5 for C. Thanks.