x
login about faq Site discussion (meta-askssc)

Restoring just few columns of a table.

How do we restore just few columns of a table from one database to another.. say for example, if we need only 3 attribute's data of the a table consisting of 30 attributes in total. It is a sql server 200O database. Anything that we need to keep in mind in order to process this ? my initial idea was, to use export and import utility, to get the specific columns from table in the DB...This question is to confirm my thoughts and learn if any new ideas or efficient ways to do this.

Thanks!

more ▼

asked Feb 15 '10 at 03:05 PM in Default

Katie 1 gravatar image

Katie 1
1.4k 108 161 202

(comments are locked)
10|1200 characters needed characters left

2 answers: sort voted first

If this is a one-time operation, your idea should work fine. If you need to maintain the copy, you can use replication with only the desired columns selected as articles. Please note I have only used replication with SQL Server 2005, but I believe what I described should also work with 2000.

more ▼

answered Feb 15 '10 at 03:16 PM

Tom Staab gravatar image

Tom Staab
5.8k 5 8 10

(comments are locked)
10|1200 characters needed characters left

If you want a neat GUI to handle the process then RedGate's SQL Data Compare is a great tool. I use it when we have to do a RESTORE and then identify what has changed since the last backup but it could do what you need too. There is a 14 day free trial if you want to take a look at it http://www.red-gate.com/products/SQL_Data_Compare/index.htm, as they say, it compares and synchronises database contents. Check out their SQL Compare too as that could help you synch the schemas/tables etc in the two databases.

more ▼

answered Feb 15 '10 at 04:01 PM

Fatherjack gravatar image

Fatherjack ♦♦
38.8k 55 69 104

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments



Facebook logo Follow Ask SSC on Facebook
Find Ask SSC on Google+
linkedin logo Find us on LinkedIn

Topics:

x454
x210
x95
x58
x41

asked: Feb 15 '10 at 03:05 PM

Seen: 1046 times

Last Updated: Feb 15 '10 at 03:16 PM

Copyright © 2002-2012 Simple Talk Publishing. All Rights Reserved. If you have any queries, please contact the site administrators.
Ask SQL Server Central is a community service provided by Red Gate.