I''m interested in testing a string field in each record for
several things: the number of times that something occurs in the
string, the number of times that several different things occur in the
string together at the same time, etc., including the record in the
selection if a variety of criteria are achieved, otherwise not.
For example, if the letter "a" occurs at least 3 times, or maybe
if "a" and "b" don''t occur together more than 2
times in that field,
or if at least any 2 of the letters "a" or "b" or
"c" can be found
then the record would be output.
It would seem that I would have to test the field of each record
multiple times to accomplish those.
I could use either the "meta_where" gem or regular SQL, but I
can''t think of how to do this with either. Any suggestions?
Thanks,
Barney
--
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.