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 |
|
frank.svs
Constraint Violating Yak Guru
368 Posts |
Posted - 2007-04-05 : 16:09:24
|
| Hi frns, I have 2 databases in SQL Server 2005 i.e DB1 & DB2.in DB1 and DB2 i have same table with name "EMP" with same structure but data is present in only in DB1 "EMP" tbl but not in DB2 "EMP" tbl.Now i need to insert data into DB2 "EMP" tbl based on DB1 "EMP" table How would be the sql stmt. use DB2 go insert into emp select * from ....Thanks in advancefranky |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-04-05 : 16:15:25
|
| Use the 3 part naming convention for the objects:insert into DB2..emp select * from DB1..empTara Kizerhttp://weblogs.sqlteam.com/tarad/ |
 |
|
|
frank.svs
Constraint Violating Yak Guru
368 Posts |
Posted - 2007-04-07 : 03:36:09
|
| Thank you |
 |
|
|
|
|
|