The code is good, but would be VERY inefficient if the existing table is large.
If it is, I would suggest that you create a new table with the desired structure and append the data to it.
Or copy the contents to a temp table, zap the existing one then pull the data back.
HTH
Regards
Griff
Keep [Smile]ing