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!

INSERT INTO two different tables ?

Status
Not open for further replies.

Benouche

Programmer
Aug 6, 2002
48
0
0
FR
Hello,

is it possible to insert a SELECTion into 2 tables ?

thanks,
Benouche

 
... because I need to had this info in one table as temporary data (will be replaced after control few days later ..) and in another one to store it.

I'd like to avoid to run the select clause twice for obvious performance reasons ...

Regards,
Benouche
 
Try to insert into one table including a column which will "mark" the batch of inserts (date, run-number . . ) then insert into the second by selecting from the first. Just a question of doing so efficently (indexes etc).

On the other hand your original select might be just as fast!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top