Please advise - working with internal table

Hello friends,
I need an advise how to create the following consecutive change sets in one change log:

  • create an internal table having the structure of a specific database table
    needed result: db table1: <key field 1>, <key field 2> => internalTable1: <key field 1>, <key field 2>
  • select distinct from the database table into the internal table
    needed result: db table1: [a,1], [a,2], [a,3], [b,4], [b,5], [b,6] => internalTable1: [a,1], [b,4]
  • update the internal table <key field 2> with a constant
    needed result: internalTable1: [a,something], [b,something]
  • insert the internal table into the databae table (which will be empty at this stage)
    needed result: db table1: [a, something], [b, something]

Thanks in advance ,
Amir

Hi @amir001,

For all these changes you can for the most part just use formatted sql so you can just write your changesets in as sql.

I am unable to understand the steps you are describing in theory/words, would you please provide the sql for:

Thanks,

Ronak