DCSIMG

 Subscribe in a reader

Script SQL data into insert statements - Guy kolbis
Tuesday, April 24, 2007 8:51 AM kolbis

Script SQL data into insert statements

On a project that I lead, I had to supply with an installation exe. The project is an ASP.NET with Win Services and SQL2005 as the back-end storage.

So, part of the installation is the database. I had two options to create the database in the installation process:

  • Use a *.bak file.
  • Use SQL scripts.

The good thing about scripts is the fact that you can automate it within SQL Server; however the automation does not include the data. In order to add data I must write a SQL script with insert statements. Unfortunately, I had a LOT of data to insert, so I decided to go with the database backup, AKA *.bak file.

Recently I ran into a nice SQL Server Add-In that does just it. You can script all the data in a given table into insert statements and save it as a SQL script.

This is exactly what I have been looking for :-)

You can find the Add-In here.

תגים:, ,

תוכן התגובה

# re: Script SQL data into insert statements

Adlai Maschiach כתב/ה

http://vyaskn.tripod.com/code.htm#inserts

Tuesday, April 24, 2007 11:15 AM

שלח תגובה

(שדה חובה) 
(שדה חובה) 
(אופציונלי)
(שדה חובה) 

Enter the numbers above: