Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
anabelle
Starting Member
19 Posts |
Posted - 2010-07-28 : 23:28:22
|
Production1 and Production2 database is of the same structure,both contains dbo.sales table. Production1 database contains new records of dbo.sales to be transferred to Production2 database into dbo.sales table.How am i going to insert those records from Production1.dbo.sales to Production2.dbo.sales?edit: moved to proper forum |
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2010-07-28 : 23:30:47
|
INSERT INTO Production2.dbo.sales SELECT * FROM Production1.dbo.sales |
 |
|
anabelle
Starting Member
19 Posts |
Posted - 2010-07-28 : 23:42:08
|
Msg 273, Level 16, State 1, Line 3Cannot insert an explicit value into a timestamp column. Use INSERT with a column list to exclude the timestamp column, or insert a DEFAULT into the timestamp column.THIS IS THE ERROR MESSAGE when i try to run the script,because in the table dbo.sales it has loggeddate and loggedtime...how am i going to exclude the timestamp? |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-07-29 : 04:46:25
|
INSERT INTO Production2.dbo.sales(col1,col2...colN)SELECT col1,col2...colN FROM Production1.dbo.salesExclude timestamp column from the listMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|