I have a table with an integer field. This field maybe NULL. If the field isn't null it should be separated by 10 numbers at all times. Can I do this with a signle UPDATE statement or do I have to write a more complex stored procedure to do this.
Example the field could contain 10, 20, 30, 40, NULL, NULL, NULL.
So if I put a new field lets say 12. Then I should recalc all fields to be 10, 20, 30, 40, 50, NULL, NULL, NULL.
(The way to connect this to a trigger isn't a problem at this time. Only the UPDATE query).
I'll use MS SQL server but it's nice if it is "as ANSI compartible" as possible.