dbTalk Databases Forums  

dump data into SQL script as "insert ..."

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss dump data into SQL script as "insert ..." in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
frank
 
Posts: n/a

Default dump data into SQL script as "insert ..." - 09-12-2005 , 05:39 PM






I am wondering if there is an easy way to script data into script.

i.e. I want to create a script file. For each record in each table, I'll
have a sql script like

INSERT INTO MyTable1 (Col1, Col2, Col3)VALUES(1, 'myVal11', 'myval12')
INSERT INTO MyTable1 (Col1, Col2, Col3)VALUES(2, 'myVal21', 'myval22')
....

I know I can do it in Oracle but I could get it in SQL Server by scripting
DB objects.

Frank


Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: dump data into SQL script as "insert ..." - 09-12-2005 , 05:49 PM






This might be what you are looking for

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

Allan

"frank" <frank (AT) discussions (DOT) microsoft.com> wrote


Quote:
I am wondering if there is an easy way to script data into script.

i.e. I want to create a script file. For each record in each table, I'll
have a sql script like

INSERT INTO MyTable1 (Col1, Col2, Col3)VALUES(1, 'myVal11', 'myval12')
INSERT INTO MyTable1 (Col1, Col2, Col3)VALUES(2, 'myVal21', 'myval22')
...

I know I can do it in Oracle but I could get it in SQL Server by
scripting
DB objects.

Frank


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.