Generate sequence number based on quantity field
Posted: Fri Jan 09, 2015 10:09 pm
Hello,
Input: id(1), name(10), quantity(2)
output: id(1), name(10), sequence(2)
It replicates the record based on the quantity field and generates a sequence number.
Could you please tell me how to do this using sort?
Thank you.
Input: id(1), name(10), quantity(2)
1chair 03
2pc 01
3tv 02
2pc 01
3tv 02
output: id(1), name(10), sequence(2)
1chair 01
1chair 02
1chair 03
2pc 01
3tv 01
3tv 02
1chair 02
1chair 03
2pc 01
3tv 01
3tv 02
It replicates the record based on the quantity field and generates a sequence number.
Could you please tell me how to do this using sort?
Thank you.