Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Import a table from one db to another
Message
General information
Forum:
Microsoft SQL Server
Category:
Import/Export
Environment versions
SQL Server:
SQL Server 2008
Miscellaneous
Thread ID:
01565436
Message ID:
01565442
Views:
39
>>>>Hi,
>>>>
>>>>I need to copy a table from one database to another, on the same SQL Server. I tried using Task -> Import wizard but does not seem to give me a choice of just selecting one table. Is there a way to select just one table when Importing? Or it there another way to copy the entire table from one db to another?
>>>>
>>>>TIA
>>>
>>>
>>>You can do that straight from SSMS. Right Click on the database you want to import a table into and click on Tasks and then Import Data. A wizard will walk you through it.
>>
>>I see. I get a lot of violations. So it looks like I have to disable the Identity columns on the table into which importing. Otherwise, the Import probably copies the values from the Identity columns.. Is this correct?
>
>No. If you go into the mapping options, you can tell it to allow identity insert. Only do that if you want to make sure your identity fields are in fact identical to the original table.

Actually I do want the identity columns to copy because I have 2 tables and one is related to another. But what I find is that the column timestamp_column gives me error. It must be a read-only column. But I can't see in the Column Mapping a choice to exclude this column.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform