Re: Two Tables with Different Dates

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Do the Union query and, then, Join that query with the Patient table. I'm
assuming one of the fields in the encounter tables is a Patient ID or
something.

Select PatientRegistry.field1,
PatientRegistry.field2,
YourUnionQuery.Field3,
YourUnionQuery.Field4
>From PatientRegistry Join YourUnionQuery ON YourUnionQuery.PatientID =
PatientRegistry.PatientID;

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html



"JanetF" <JanetF@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:5C467CD4-7E88-4781-9CEB-C4B0F120A02F@xxxxxxxxxxxxxxxx
> Lynn,
>
> Thanks, but I also have to include several fields from a third table,
> Patient Registry, which has the field which everything will be sorted by
> in
> the final query, and that is the Patient Number. Any idea how to include
> this? Thanks for your help.
>
> Janet
>
> "Lynn Trapp" wrote:
>
>> You might want to look at using a Union query.
>>
>> Select *
>> From Encounters
>> UNION
>> Select *
>> From EncounterHistory;
>>
>> --
>> Lynn Trapp
>> MS Access MVP
>> www.ltcomputerdesigns.com
>> Access Security: www.ltcomputerdesigns.com/Security.htm
>> Jeff Conrad's Access Junkie List:
>> http://home.bendbroadband.com/conradsystems/accessjunkie.html
>>
>>
>>
>> "JanetF" <JanetF@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> news:3DAEDC57-63A2-4DA8-944F-CA5ACF183DE6@xxxxxxxxxxxxxxxx
>> > Hi there,
>> >
>> > I have a problem in that I want to create a query with two tables that
>> > have
>> > exactly the same fields in them. The fields in each table are based
>> > upon
>> > an
>> > Admit Date. One table is called the Encounter table and the other is
>> > the
>> > Encounter History table. None of the dates in the tables are
>> > duplicates.
>> > There is a third table which is called Patient Registry. I need to be
>> > able
>> > to show all Admit Dates and their pertaining information for each
>> > Patient
>> > in
>> > my query. That would be a total of Admit Dates from the Encounter and
>> > the
>> > Encounter History tables per patient. My problem is all the fields in
>> > each
>> > Encounter table have exactly the same names, yet I need to show info
>> > from
>> > both. I hope someone can help. Thanks.
>> >
>> > Janet
>>
>>
>>


.



Relevant Pages

  • Re: Two Tables with Different Dates
    ... Jet will resolve using the aliases for the tables that have the same field ... > the final query, and that is the Patient Number. ... One table is called the Encounter table and the other is the ...
    (microsoft.public.access.queries)
  • Re: Two Tables with Different Dates
    ... the final query, and that is the Patient Number. ... One table is called the Encounter table and the other is the ... >> There is a third table which is called Patient Registry. ...
    (microsoft.public.access.queries)
  • RE: Can I choose the columns queried from a form?
    ... then you need to use an Union query to pull the tables together and then ... You would have fields as I said for Patient, Test, DateDrawn, Results, etc. ... As different docs look in the database, each wants to know about a patient ...
    (microsoft.public.access.queries)
  • Two Tables with Different Dates
    ... I have a problem in that I want to create a query with two tables that have ... Admit Date. ... One table is called the Encounter table and the other is the ... There is a third table which is called Patient Registry. ...
    (microsoft.public.access.queries)
  • Re: Two Tables with Different Dates
    ... You might want to look at using a Union query. ... One table is called the Encounter table and the other is the ... > to show all Admit Dates and their pertaining information for each Patient ...
    (microsoft.public.access.queries)