I am trying to do this with sql code without using a cursor.
I have table A with two cols and no PK
ID
Data
I have table B with three cols the first two make up the PK
ID PK
SEQ PK
Data
If I have the following data in Table A
1000 myData1
1000 myData2
1000 myData3
1001 myData4
1001 myData5
1002 myData6
I want this in table B
1000 1 myData1
1000 2 myData2
1000 3 myData3
1001 1 myData4
1001 2 myData5
1002 1 myData6
Without using cusors, I want to be able to do it in a set based manner.
Thanks for any help.