larrydavid
Programmer
Hello, I have a challenge I'm hoping someone can help me with. I have a SQL Server 2005 table with a (non-PK) int column which is currently ordered like this:
1
2
4
5
6
8
9
What I need to do is remove the gaps (missing numbers) and reorder the values like so:
1
2
3
4
5
6
7
Is there a stored procedure or way to simply do this in an update statement? This would be a one-time update.
Thank you,
Lawrence
1
2
4
5
6
8
9
What I need to do is remove the gaps (missing numbers) and reorder the values like so:
1
2
3
4
5
6
7
Is there a stored procedure or way to simply do this in an update statement? This would be a one-time update.
Thank you,
Lawrence