Re: Two Tables with Different Dates

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



Use table aliases. For example,

Select T1.FieldName, T2.FieldName
from Table1 T1, Table2 T2 etc.

Jet will resolve using the aliases for the tables that have the same field
names.

Good Luck!
--
Chaim


"JanetF" wrote:

> 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
    ... Do the Union query and, then, Join that query with the Patient table. ... One table is called the Encounter table and the other is ...
    (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)
  • 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)
  • Re: MER - complicated join
    ... How do I set up a join so that my main table can get prices attached to it ... tells me to create a separate query and then include that query in the sql - ... So each record in ENCOUNTER has up to 4 codes populated. ...
    (microsoft.public.access.formscoding)