G
Guest
I have 2 tables that were created by importing from 2 spreadsheets in excel.
Table 1 lists procedures/locations/equ1/equ2/equ3/equ4/equ5
Table 2 contains the crosswalk of what the equ represents by number and
description. For example table 1:
Procedure location equ1 equ2 equ3 equ4 equ5
xyz nyc 34
xyz nyc 34 212
xyz brx 22 78 98
There are 12 vets, 5 locations, 400 pieces of equipment. We don't care about
who is performing these procedures only what they are performing and with
what. So many vets can use the same piece of equipment at the same location.
In the table and spreadsheet that would be listed as many times as a
different vet used the same piece of equipment at the same location. There
are no primary keys to the tables
I tried to write 1 query pulling all the info but could not get it to work so
I wrote 5 different queries because there are a total of 5 pieces of
equipment per procedure the vet could use. Each query is pulling the
procedure/equ/location/equ# (from table2)/description(from table2) So query 1:
Procedure EQU1 EQU#(table2) Description(table2) location
xyz 34 34 CableDraw
nyc
xyz 34 34 CableDraw
nyc
xyz 22 22 Blood
brx
What I would like to do is have one query that pulls all 5 pieces of
equipment (if listed) per procedure per location removing any duplicates. So
if 2 vets used the same piece of equipment at the same location for the same
procedure it would only be listed once, with the description of the
equipment. The main thing is what equipment is used for each procedure at
each location.
Or somehow join the 5 queries and remove any duplicates pieces of equipment
per procedure
Help Please!!
Table 1 lists procedures/locations/equ1/equ2/equ3/equ4/equ5
Table 2 contains the crosswalk of what the equ represents by number and
description. For example table 1:
Procedure location equ1 equ2 equ3 equ4 equ5
xyz nyc 34
xyz nyc 34 212
xyz brx 22 78 98
There are 12 vets, 5 locations, 400 pieces of equipment. We don't care about
who is performing these procedures only what they are performing and with
what. So many vets can use the same piece of equipment at the same location.
In the table and spreadsheet that would be listed as many times as a
different vet used the same piece of equipment at the same location. There
are no primary keys to the tables
I tried to write 1 query pulling all the info but could not get it to work so
I wrote 5 different queries because there are a total of 5 pieces of
equipment per procedure the vet could use. Each query is pulling the
procedure/equ/location/equ# (from table2)/description(from table2) So query 1:
Procedure EQU1 EQU#(table2) Description(table2) location
xyz 34 34 CableDraw
nyc
xyz 34 34 CableDraw
nyc
xyz 22 22 Blood
brx
What I would like to do is have one query that pulls all 5 pieces of
equipment (if listed) per procedure per location removing any duplicates. So
if 2 vets used the same piece of equipment at the same location for the same
procedure it would only be listed once, with the description of the
equipment. The main thing is what equipment is used for each procedure at
each location.
Or somehow join the 5 queries and remove any duplicates pieces of equipment
per procedure
Help Please!!