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

INSERT w/SUBSELECT to copy and move data

Status
Not open for further replies.

Criminologist

Programmer
Jan 22, 2002
7
US
I need help and Can't find my answer anywhere.

I want to generate an insert w/subselect statement that pulls a recordset of data and inserts it into a temporary database table where I can modify a couple of columns and then use a similar Insert w/Subselect statement to move the fresh data from my temp database to my master database.

I DON'T want to use any other method of temporarily holding the data to edit it, I want it moved into the temp DB, modified, then moved back.

Please help me in telling me what is the correct syntax for generating this SQL statement? What I have so far is this:
Code:
Set RSInsertHeaderTmp = Server.CreateObject("ADODB.Recordset")
SQLInsertHeaderTmp = "INSERT INTO rccnhdwebtmp10 SELECT * FROM rccnhd10 WHERE contno = '   25432'"
RSInsertHeaderTmp.Open SQLInsertHeaderTmp, Conn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top