Hey all, I am writing my first migration script to transfer some data from one db to another one. I am wondering if there is a line of tsql that you can use to switch between the different dbs. Thanks in advance.
in moving from one db to another I personally prefer to simply use the fully qualified name.
insert db1.dbo.test (field1, field2)
select field1, field2 from db2.dbo.test
if on differnt servers , set up linked servers fist and then add the servername as well
insert server1.db1.dbo.test (field1, field2)
select field1, field2 from server2.db2.dbo.test
"NOTHING is more important in a database than integrity." ESquared
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.