sql server 2005 - How can I export data from my table to a sql file? -


I am using SQL Server 2005 and I export all records from my employee I want to have a .sql file but when I run the export data option, it only generates a script for the structure of the employee table, it does not record in it

What I want to do is generate a script in which one The INSERT statement will be from the employee table Knowledge will include (like PHP Admin).

What is possible in SQL Server 2005? Please help me how to do this ..

Thank you ....

There is no tool in SQL Server 2005 which will export your data as a SQL statement, which I think means ".sql file". The best way to export data using SQL Server tools is probably BCP, which can copy the bulk of data in a file. File contains only data, no SQL command, BCP command and bulk INSERT SQL command can be used to insert data into employee table.

If you want to create your own SQL INSERTs, then you can create a statement like this:

<(> + cast (varchar as employee) + ',' '' + LastName + '' ',' + + First name + '' ') Select formerly Include employee (employee ID, last name, first name) Value from employee

You can save results in your .sql file. However, you can probably see that there is a little work to fix it. I'm not sure the syntax is correct in my example (did I get the correct number of single-quotations?)


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -