Can someone help this task? If I have one table as below in Teradata:
caseid | content | repeat |
---|---|---|
id1 | row1 | 2 |
id2 | row2 | 3 |
I want to build a new table based on the repeat value as below. How should I do?
caseid | content | repeat | groupid |
---|---|---|---|
id1 | row1 | 2 | 1 |
id1 | row1 | 2 | 2 |
id2 | row2 | 3 | 1 |
id2 | row2 | 3 | 2 |
id2 | row2 | 3 | 3 |
Thanks!