Larry Watanabe
Larry Watanabe

Reputation: 10184

SQL save data to file

I'd like to save data from an SQL Server database table to a file, then load it into another database that has the same table already created in it

How can I do this?

I know there should be some simple way of doing it, but Stack Overflow search and Google aren't yielding good answers (or I'm not asking a good question).

Upvotes: 0

Views: 4577

Answers (3)

KM.
KM.

Reputation: 103589

the bcp utility and BULK INSERT as mentioned by @Lukasz Lysik are good for moving lots of data. However, sp_generate_inserts by Narayana Vyas Kondreddi allows for many filtering options of the data, and good when there isn't that much data.

Upvotes: 1

Kevin LaBranche
Kevin LaBranche

Reputation: 21078

You could use the Import/Export Wizard. Right click on your database in Management Studio and look for import data and export data under the tasks item.

Upvotes: 2

Lukasz Lysik
Lukasz Lysik

Reputation: 10610

Check bcp utility and BULK INSERT statement.

Upvotes: 1

Related Questions