I am inserting rows from one table into another table. The source table has no primary key. The destination table has a combo primary key on two columns...CallID and Seq.
I've got data that looks like this in source table:
CallID Seq col_x
123456 1 x...
123456 2 y...
123456 1 y...
123456 2 z...
321654 1 x...
321654 1 y...
321654 2 x...
Before I can move it into the destination table, I need the Seq column renumbered like so:
CallID Seq col_x
123456 1 x...
123456 2 y...
123456 3 y...
123456 4 z...
321654 1 x...
321654 2 y...
321654 3 x...
I have no idea where to start...any suggestions appreciated.
I've got data that looks like this in source table:
CallID Seq col_x
123456 1 x...
123456 2 y...
123456 1 y...
123456 2 z...
321654 1 x...
321654 1 y...
321654 2 x...
Before I can move it into the destination table, I need the Seq column renumbered like so:
CallID Seq col_x
123456 1 x...
123456 2 y...
123456 3 y...
123456 4 z...
321654 1 x...
321654 2 y...
321654 3 x...
I have no idea where to start...any suggestions appreciated.