| Author |
How to create a insert script file (*.sql)?
|
|
|
| Hello,
I have a table with data, now I want to create a *.sql file with all
the INSERT statements from this table.
How can I do that?
Thanks!
| |
| Steve Thompson 2002-11-21, 12:24 pm |
| "Boah" <boah123@hotmail.com> wrote in message
news:8202c755.0211210919.7254670b@posting.google.com...
> I have a table with data, now I want to create a *.sql file with all
> the INSERT statements from this table.
>
> How can I do that?
Consider using bcp (utility) to copy the data out and bcp to copy it back
in...
It works well and it's fast.
Steve
| |
| Quentin Ran 2002-11-21, 12:24 pm |
| Boah,
if you HAVE to create the script (not for the purpose of data transfer), one
way is that you can write a cursor which generates the statements with the
values from the table.
Quentin
"Boah" <boah123@hotmail.com> wrote in message
news:8202c755.0211210919.7254670b@posting.google.com...
> Hello,
>
> I have a table with data, now I want to create a *.sql file with all
> the INSERT statements from this table.
>
> How can I do that?
>
> Thanks!
| |
|
|
|
|