0

i have a scenario like the below ...where based on value of num_seats i have to split the rows in target into that amount of data along with another field(seat_num) which will be having counter which will increment by 1.Please suggest..

enter image description here

Coding_line
  • 127
  • 4
  • 15

1 Answers1

4

You can clone the rows based on a field value (in this case, num_seats), remove the original (non-cloned) row, then calculate the seat number and replace the original fields (num_seats, seat_num, last_seat, etc.) with the new values:

enter image description here

Here's a Gist of the above transformation: https://gist.github.com/mattyb149/e4cf796ff45983ebf87e

mattyb
  • 11,693
  • 15
  • 20