October 2, 2008 at 2:20 am
hello everyone,
At this moment i am working at denormalisation of a databases. I wanne copy some tables (definitions and values) from one database to another database. Is it posible to do it with only tsql on an easy way. I don't have unfortunaly DTS services that i can use.
Any sugestions are wellcome.
Kind regards
Johan Van den Bosch
October 2, 2008 at 2:27 am
yes and very easy:
SELECT * INTO DESTINATION_DATABASE.DBO.TABLE
FROM SOURCE_DATABASE.DBO.TABLE;
GO
DESTINATION_DATABASE is your database where you want to put the table and you data of that table!
SOURCE_DATABASE is your database where are the tables and the data that you want to copy!
another warning is that DBO is the schema so you should check if you are working with that schema or you have your own schema in your databases!
that's all!
Dugi
October 2, 2008 at 2:30 am
...or you can use Import/Export Data wizards ... if you want to working by clicking!
if you have any problem ...we are here!
Dugi
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply