|
-
October 14th, 1999, 09:14 AM
#1
copy contents from databases
I use 'insert into table1 select * from table2' to copy contents from one table to another when they are in the same database.
But how do I do that if the tables are in different databases. I am using ADO's in VB. Do I need to open both the databases and then use the statement?
Thanks
-
October 14th, 1999, 10:28 AM
#2
Re: copy contents from databases
it probably depends on your backend.
If your database is SQLServer you do not need to open both databases. Just open the target database and issue a statement like
insert into table1 select * from database.owner.tablename
you can even use the following syntax to insert from another server
insert into table1 exec server.database.owner.spName
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|