sycn table changes in a wrong order

e106199e106199 Posts: 3
edited February 8, 2006 10:01AM in SQL Compare Previous Versions
Hi,
i have a table structure like
col1
col2
col3

when i change it to
col1
col2
col2a (this is the new column located between col2 and col3)
col3

the remote database is sync and it becomes
col1
col2
col3
col2a (adding new column after the last column)

this is a problem if i have insert stored procedures. sql compare thinks the tables are same and they are but they have a different layout so its breaking the insert stored procedures.
here is a sample insert procedure;
insert into table1
values
@value1,
@value2,
@value2a,
@value3

this procedure is writing the value of column2a in column3 because column2a is placed in the wrong location on the target table. Any solutions for this?
thank you
-shane

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hello Shane,

    Yes, the solution is really simple. Compare and synchronize using the 'force column order to be identical' option. This will force a table rebuild if necessary to arrange the columns in the same order as the source database rather than appending new columns at the end of the column list for the table.
  • thank you,
    i knew it was a simple task for sql compare.
    maybe it should be a default check since its the most guarantee way to sync tables.
    -shane
Sign In or Register to comment.