hi all any one know how to create a temporary table and fill it, like: #------------------------------------------------------------ create temporary table test1 select * from test; #------------------------------------------------------------ regards. -- Posted via http://www.ruby-forum.com/.
ActiveRecord::Base.connection.execute my_sql_string
Joe Black <allenbobo@...> writes:> > #------------------------------------------------------------ > create temporary table test1 select * from test; > #------------------------------------------------------------Using Migration/Schema parlance, you can do: create_table (:test1), :temporary=> true do |t| t.column :field1, :string, :limit => 50 t.column :field2, :string, :limit => 50 end -damon http://damonclinkscales.com/
thanks Kyle Maxwell and Damon Clinkscales cheers Damon Clinkscales wrote:> Joe Black <allenbobo@...> writes: > >> >> #------------------------------------------------------------ >> create temporary table test1 select * from test; >> #------------------------------------------------------------ > > Using Migration/Schema parlance, you can do: > > create_table (:test1), :temporary=> true do |t| > t.column :field1, :string, :limit => 50 > t.column :field2, :string, :limit => 50 > end > > -damon > http://damonclinkscales.com/-- Posted via http://www.ruby-forum.com/.