Efficiently doing INSERT INTO...SELECT FROM in AR

Wes Gamble wrote:

I need to archive an entire set of rows from one table to another, in effect, doing this SQL:

INSERT INTO table1 SELECT * FROM table2 WHERE blah...

Should I just do bare SQL or is there some "bulk insert" functionality exposed in ActiveRecord for me to use?

Thanks, Wes

-- Posted via http://www.ruby-forum.com/.

You could extract the table to a fixture, rename it, and load the fixture.

_Kevin