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 |
saurabhjj
Starting Member
13 Posts |
Posted - 2007-11-05 : 13:38:50
|
i have two databases, each of them have 1 table each, both the tables have same schema, i want to copy records from one table into another, can anyone please help me out |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-11-05 : 13:42:09
|
Use the three part naming convention for the remote object.INSERT INTO DB1.dbo.Table1 (...)SELECT ...FROM DB2.dbo.Table1...Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/ |
|
|
saurabhjj
Starting Member
13 Posts |
Posted - 2007-11-05 : 13:45:30
|
which file should i choose .mdf or .log |
|
|
dinakar
Master Smack Fu Yak Hacker
2507 Posts |
Posted - 2007-11-05 : 13:47:01
|
quote: Originally posted by saurabhjj which file should i choose .mdf or .log
what??? Dinakar Nethi************************Life is short. Enjoy it.************************http://weblogs.sqlteam.com/dinakar/ |
|
|
dinakar
Master Smack Fu Yak Hacker
2507 Posts |
Posted - 2007-11-05 : 13:48:24
|
You SELECT/INSERT into tables/(other objects) IN the database.Dinakar Nethi************************Life is short. Enjoy it.************************http://weblogs.sqlteam.com/dinakar/ |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-11-05 : 13:48:25
|
quote: Originally posted by saurabhjj which file should i choose .mdf or .log
You don't reference the MDF or the LDF file in your queries, so I'm very confused why you are asking this.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/ |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-11-06 : 00:58:28
|
quote: Originally posted by saurabhjj which file should i choose .mdf or .log
You dont need to choose any files. Run the query suggested by Tara in Query AnalyserMadhivananFailing to plan is Planning to fail |
|
|
|
|
|