Using INTERSECT in Base find

Hi Everyone,

I am having a bit of trouble figuring out how to use the SQL INTERSECT
command within a find.

I have been using find_by_sql but it doesn’t play nicely with
with_scope so I need to get it into a normal find query.

Is this possible or do I need to do the intersection in rails instead
of the database? (or manually apply the scope to the find_by_sql query)

thanks,
Bob

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs