How can we help you today? How can we help you today?

sycn table changes in a wrong order

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
e106199
0

Comments

2 comments

  • Brian Donahue
    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.
    Brian Donahue
    0
  • e106199
    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
    e106199
    0

Add comment

Please sign in to leave a comment.