Forum: Ruby on Rails custom sql queries beyond CRUD

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Tuka O. (Guest)
on 2006-03-02 11:32
Hi,

I am just starting of in rails. I am trying to understand the features
of rails and I have this burning question. (and search is not available
now):

Apart from relying on the automatic CRUD sql script produced, is there a
way I can create my own sql script ex: with many joins between exixting
tables (for reporting ). All I need is to declare the custom query and
place the result in a recordset and then to display it somewhere.

Thanks also for any links to documentation that clarifies this.

TIA,
Tuka

PS: I dont program with ruby yet... but I can easily read any snippet
given.. I think
Wilson B. (Guest)
on 2006-03-05 07:49
(Received via mailing list)
On 3/2/06, Tuka O. <removed_email_address@domain.invalid> wrote:
>
> Thanks also for any links to documentation that clarifies this.
>

You can use the "direct" database selectors if you need them:
http://api.rubyonrails.com/classes/ActiveRecord/Co...
They are particularly useful for accessing DB-specific features that
you can't get at through the normal connection adapters, or for
connecting to horrible legacy stored procedures.

Edge Rails also includes some very handy calculation features for
complex sum/partition statements.
Tuka O. (Guest)
on 2006-03-08 22:40
Thanks a lot, this helps
Cheers
tuka
This topic is locked and can not be replied to.