October 10, 2011 at 6:44 pm
I always seem to forget how to export data as insert scripts from the database. Is there some type of simple T/SQL script I can use for this? For example:
EXPORT AS INSERT
[MySchema1].[MyTable1],
[MySchema2].[MyTable2]
It would really simplify things for me if I could use a script like this instead of having to remember how to do this through SSMS UI navigation options....
October 10, 2011 at 7:09 pm
take a look in the script library here on SSC, there are a lot of contributions that do what you are asking;
I've been using this from http://vyaskn.tripod.com/code.htm for quite a while:
Procedure to script your data (to generate INSERT statements from the existing data)
usage is a simple as exec sp_generate-inserts [tablename] with a lot of other options as well.
Lowell
October 10, 2011 at 7:47 pm
October 10, 2011 at 8:48 pm
how about using the good old bcp way of doing things ?
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
October 11, 2011 at 2:32 am
Ninja's_RGR'us (10/10/2011)
http://www.ssmstoolspack.com/
+1
For small datasets, I'd go with SSMS ToolsPack.
The tool comes with lots of useful features and it's free.
-- Gianluca Sartori
October 11, 2011 at 2:41 am
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply