I have a table that has many records with the location as MHB. What I would like to do is a query that grabs all the records with MHB and insert them into another table BUT now I would like to separate all the MHB records into MHB1, MHB2, MHB3 and MHB4.
So now I lets say I have 6 records with MHB as the location in the table:
Location Source
MHB 2
MHB 2
MHB 3
MHB 4
MHB 5
MHB 6
Then when I insert these records in the new table it should look like this:
Location Source
MHB1 2
MHB2 2
MHB3 3
MHB4 4
MHB1 5
MHB2 6
Is it possible to do this without using the cursor loop or any loop for that matter?
Thanks for the help