Is SELECT INTO able to affect data from its original table during UPDATE

Posted by driveby on Stack Overflow See other posts from Stack Overflow or by driveby
Published on 2010-03-11T18:53:38Z Indexed on 2010/03/11 18:54 UTC
Read the original article Hit count: 273

Filed under:
|
|

Whilst asking this question asp.net scheduling timed events user murph posted some insightful information:

Point about this is that its very, very simple - you have an process for exchange that is performing a clearly defined task and you have a high frequency task that is not doing anything particularly complex, its a straightforward query (select from table where sent = false and send at < value) - probably into temporary table so that you can run a single query update after you've done the sends - that you can optimise the index for. You're not trying to queue up a huge pile of event triggers, just one that fires once a minute and processes things that are due.

Is it possible to SELECT data from table X INTO table Y and have the UPDATES that are performed on table Y pushed into table X? I guess the alternative would be that the data gets updated in table Y then an update command can be run on table X based on the data in table Y. What would be the advantage of selecting into another table?

Thank you,

© Stack Overflow or respective owner

Related posts about sql-server

Related posts about select