JOIN 4 tables
Posted on 2006-04-05
Three tables (PTBB, PTBBARC, and PTBBUpdateARC) have the same fields below:
These three tbles need to be joined with the table, ptautoArc.
mrnauto, BloodReceived, DateEnterAuto
MRN and mrnauto are the keys for the join.
The information (MRN, etc......, Antibody) can exit on any of the tables or all of the tables.
If the information exists on PTBB, then use PTBB and ignore the other two for the join,
if the information exists on PTBBARC, then use PTBBARC and ignore the other two for the join,
otherwise, use PTBBUpdateARC and ignore the other two for the join.
ptautoArc has 100 records, so the output should return 100 records.