Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I generate "INSERT into TableA Values(1,2,3)" statements ?

Status
Not open for further replies.

mb224

Programmer
Oct 15, 2004
55
0
0
US
How do I generate "INSERT into TableA Values(1,2,3)" statements from a given table.

I need to generate insert statements for all the records in one table .... and go to another server machine and insert them into a similar table using SQL Query Analyzer.

DTS is not handy to connect the 2 servers to exchange data so this will be very convenient for me!

Will Access2000 perhaps be able to do it easier? Any help is good!
 
An easier way might be to use a linked server and then insert directly from one to another:

Code:
INSERT table
SELECT *
FROM server2.mydb.dbo.table

--James
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top