Caveman's Blog

My commitment to learning.

SQL Server: Generic Sql Table Data Insert Script

with one comment


woah!!

I have my own blog and this is my first posting. hurray…. I have been shying away from doing this for a long time now… finally pulled all my energies to start blogging tech stuff that I learn …

There is so much that I learn and so much I forget all the time…. It is getting really tough to keep track of all that I have learned…. I hope I can keep up with posting useful stuff that I learn.

enough of my preamble now… cutting the chase and getting to my post…

How many time must I have thought ” I wish I had a script that I would run with the table name as an argument and get insert statements for all the data in a Sql Server 2000/2005 table.” Thanks to Narayana Vyas Kondreddi, I have got a script [1] that does exactly what I want. This is a cool utility that is very handy.

To generate INSERT statements for table ‘titles’:
EXEC sp_generate_inserts ‘titles’

Update: 3/5/2012

Here are a few other ways to accomplish the same:

References:
1. http://vyaskn.tripod.com/code.htm#tagit

Advertisements

Written by cavemansblog

January 28, 2008 at 8:14 pm

One Response

Subscribe to comments with RSS.

  1. […] developed by Narayana Vyas Kondreddi [1], to generate data inserting scripts for a long time now. This procedure has an array of features for different scenarios. However I often felt that it […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: