Hi team,I have logic like below ,I need to insert the records into my target table using the below logic,can some one please provide the logic

In my source table I have columns like this

firstpart,date, quantity,date1,quenyity2,date3, quenyity3-,-,-,-,--,-,-,-,-,date24,quentity24

,like this I will get some data in my source forecast table

So here for every "firstpart" I will get number of columns of data(date, quantity),from the forecast table ,and this data will be coming in the form of columns ,as I explained in the above, so total number of columns are 24 for every month for each "firstpart",and the data will be exist for 12/15/17 columns(date, quantity).

I need to convert all the(date, quantity) columns data into the rows based on the "firstpart" value ,and before inserting the data,I need to update the first row as "STA",and the last row is "FAU" ,how can we insert this 2 rows additional along with the (date, quantity) of columns data

Source Forecast table data

Columns

_-----------------

## Firstpart,date, quantity

A1,1-1-2021,200

A1,2-1-2021,100

A1,3-1-2021,300

B1,1-1-2021,100

B2,2-1-2021,200

B3,3-1-2021,300

## Desired output

Firstpart,date,quantity

A1,STA,

A1,1-1-2021,200

A1,2-1-2021,100

A1,3-1-2021,300

,

,

,

,

A1,FAU

B1,STA,

B1,1-1-2021,100

B1,2-1-2021,200

B1,3-1-2021,300

,

,

,

B1,FAU,

I hope the above requirement is understand, please let me know ,in case need any details.

Thank you in advance!