I have a table A which has a column named msrepl_synctran_ts because of the replication we have on this table.
Now I have a new table B which is a backup table for table A and it has contained the field msrepl_synctran_ts as well, in fact all fields are indentical. It is one of our testing table and it must contain the field msrepl_synctran_ts.
I need to transfer some data from table A to this backup table B but whenever I do the below:
INSERT INTO B ([FieldA], [msrepl_synctran_ts])
SELECT [FieldA], [msrepl_synctran_ts] FROM A
I get the following error:
Cannot insert a non-null value into a timestamp column. Use INSERT with a column list or with a default of NULL for the timestamp column.
So I do this:
INSERT INTO B ([FieldA])
SELECT [FieldA] FROM A
But I get this:
Cannot insert the value NULL into column 'msrepl_tran_version', table 'DB1.dbo.B'; column does not allow nulls. INSERT fails.
How do I copy data properly from A to B?
Thank you very much.