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?

CREATE TABLE "patientsingm"
("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
"last" varchar(255),
"first" varchar(255),
"displayed_name" varchar(255),
"sex" varchar(1),
"dob" date,
"ssn" varchar(12),
"account" varchar(15)
);

CREATE TABLE "pacspatients"
  (
  "id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
  "pat_ckey" varchar(12),
  "pat_uid" varchar(50),
  "pat_name" varchar(255),
  "birth_date" varchar(10),
  "sex_code" varchar(1),
  "identifier" varchar(12)
  );

class GMPatient < ActiveRecord::Base
  establish_connection "gm"
  set_table_name "patientsingm"
end

class SybasePatient < ActiveRecord::Base
  establish_connection "sqlitepacs"
  set_table_name "pacspatients"
end

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