Yes, with
@all_clients = Client.find(:all, :select => "DISTINCT x"
where x will be the column you want to discriminate with.
Brutyn Nick wrote:> hey,
>
> i have this sql statement
> @all_clients = Client.find_by_sql("select distinct * from clients
> ......")
>
> is there any other way for implementing this "distinct" into an
sql
> statment
> with parameters??
>
> thanks in adavance
> Nick
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---