| | |
Please help!
Please support our MS SQL advertiser: Intel Parallel Studio Home
![]() |
I am assuming that both databases are on the same SQL Server instance. If you want to transfer a table between databases, try using DTS if you are on SQL 2000. There should be a method for transferring database objects. I won't explain how to use DTS so you will have to go to Microsoft's website or Books Online.
Another method is to manually create a T-SQL script of the table structure. Run it against the other database and perform an insert command with the values being pulled in by a sub query.
Make sure to replace the examples <...> with the actual DB objects. Also for this script to work, both tables must have the exact table structure.
I woudn't recommend using the SELECT INTO method which will create a table and SQL will guess what the data types are and you will have to manually add the constraints back.
Another method is to manually create a T-SQL script of the table structure. Run it against the other database and perform an insert command with the values being pulled in by a sub query.
MS SQL Syntax (Toggle Plain Text)
INSERT INTO <databaseB>..<tableA> ( SELECT * FROM <databaseA>..<tableA> )
Make sure to replace the examples <...> with the actual DB objects. Also for this script to work, both tables must have the exact table structure.
I woudn't recommend using the SELECT INTO method which will create a table and SQL will guess what the data types are and you will have to manually add the constraints back.
If in doubt, reach into the trash can and remove the user guide.
![]() |
Other Threads in the MS SQL Forum
- Previous Thread: Object Explorer
- Next Thread: how to configure figure sql mail
| Thread Tools | Search this Thread |





