Anthony writes "I love your website guys. I sure hate to cop out on this one, but I am a bit stumped as to the most logical way of changing the order of sequential numbers using either a trigger or a stored procedure.For example, I have a table like this:primary_key group_order----------- ----------- 10 1 20 2 30 3 40 4 50 5
I would like to change primary_key (40) to group_order (2) using (UPDATE tbl_example SET group_order=2 WHERE primary_key=40)
so that the table ends up looking like this:primary_key group_order----------- ----------- 10 1 40 2 20 3 40 4 50 5
It looks like a cascade of some sort could do the trick, but everything I have tried looks like way too much code for something that seems so simple. Do you have any suggestions?Btw... I am using SQL Server 2000 (SP3)Thanks,-Tony"