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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert records returned in select

Status
Not open for further replies.

vpekulas

Programmer
Jan 8, 2002
154
CA
Is there a way to insert records that are returned by a select statement ?

I have 2 identical tables, each with the same structure, but different names. I want to query one table and insert the result into another one.

I'm using MS SQL. Thanks :)

"Taxes are the fees we pay for civilized society" G.W.
 
Try something like this:
INSERT INTO Table1 SELECT * FROM Table2 WHERE ...

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top