On Sep 15, 4:03 pm, Aldric Giacomoni <rails-mailing-l...@andreas-
s.net> wrote:
> This may be very simple, but I'm getting my feet tangled within Rails.
> How do I find the unique matches (same name, dob, ssn) between two
> tables?
>
>
> class GMPatient < ActiveRecord::Base
>   establish_connection "gm"
>   set_table_name "patientsingm"
> end
>
> class SybasePatient < ActiveRecord::Base
>   establish_connection "sqlitepacs"
>   set_table_name "pacspatients"
> end
>

If they are two separate databases then you'll probably have to do
this mostly in ruby (ie grab a record from one table then see if it
exists in the other table). If both tables were in the same database
you could probably write this as a join, but not if the tables are not
in the same database

Fred
> Essentially.. How do I perform the 'AND' Set operation between those
> two?
> --
> Posted viahttp://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