• At first I thought this worked, but further testing revealed that is corrupted the table. I have two 7.0 SP3 servers and after running sp_fixColOrder, I was able to read my table remotely. However, when I do a simple table join, I got this error:

    Cannot insert the value NULL into column '', table ''; column does not allow nulls. INSERT fails.

    Now this error message (like most) did not make any sense because I'm doing a simple select and join (no update) yet getting an error indicating that an "insert fails".

    Next I tried an sp_help on my table on received many errors. Here are a few:

    Cannot insert the value NULL into column 'index_keys', table 'tempdb.dbo.#spindtab_

    Cannot insert the value NULL into column 'cnst_type', table 'tempdb.dbo.#spcnsttab

    I am sure it is the sp_fixColOrder that caused the error, because I recreated the database from a backup and ran my "join query" before and after running sp_fixColOrder.

    Perhaps the problem is caused by my indexes, default constraints, and/or an identity column.