Hi,

How complex a query can ActiveRecord handle before it's better using Raw SQL
or a View???

I need to calculate for example taxable income via a query going across 5
tables.  Some like this: Find all transaction records (transactions table),
for which they are allocated (via allocation table) to person X (person
table), for transaction dates within date1 & date2, for which the
category (categories table) associated with transaction, has a tax_id (from
tax_codes table) of XYZ.  I will need to reuse this type of query as I build
a report of various tax categories.

Question - What would Rails best practice way for the above?

[I'm thinking best to create a flat view of this and use this to then query
against]

Thanks

--~--~---------~--~----~------------~-------~--~----~
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