Salil Gaikwad wrote:

>  I am inserting data from one table to another by using following method
> 
> @data=RoyaltyReportFiles.find_by_sql("insert into royalty_reports
> (artist_name, album_name) select artist_name, album_name from
> temp_royalty_reports where id=328417")

Use either count_by_sql(), execute(), or the method higher than execute() whose 
name I forget...

Also, AR can insert one record for you very easily...


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to