Pau Cor wrote:
> This isn't exactly the same, but it might be good enough for you:
> 
> select id from docs where title like '%en%' or body like '%en%'
> 
> There is an SQL validator here: 
> http://developer.mimer.com/validator/parser200x/index.tml

Of course. Sometimes you just have to break the problem into smaller 
peaces. Althow I will have to do some research about performance (>> 
10000 records). It should even be faster if string is found in title.

Thank you also Phillip. There is so much I have to learn about AR.

In the mean time I have found that this:

select id from docs where title || body like '%en%'

works on PG3.3, sqlite3, Oracle 10. But of course not on MS-SQL2005.


by
TheR
-- 
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 [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