Creating a loop sequence and duplicating rows within one table

조회 수: 4 (최근 30일)
Aleksandra Gardecka
Aleksandra Gardecka 2019년 12월 2일
I have a table containing:
  • Order Nr (Number)
  • Product (Short text)
  • Material (Short text)
  • Date (Date)
  • Amount (Number)
  • From (Number)
  • To (Number)
From and To repeat themselves with each Order Nr How can I create a new column containing a sequence using as boundaries values from columns From and To? (I tried concat, but it returns short text).
On top of that I would like to duplicate all of the values from other columns and paste them to the newly created rows accordingly. (That I guess would be a self-join, but I'm not sure how to proceed)
Values From and To which are my sequence boundaries have no pattern (meaning I never know how many [Products] will be in an [Order] and how will it be distributed).
Table1.JPG
into
Table2.JPG

답변 (0개)

카테고리

Help CenterFile Exchange에서 Tables에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by