I'm not sure I'm using the right terminology here, so I'll try to explain. Linking table is a table that resolves a many-to-many relationship. I'm also using the abbreviation "CPK" for Composite Primary Key. Ok, on to the discussion!
I have three tables. One called "Locations", a second called "InstrumentLocations" and a third called "Instruments". Here's the table setups:
[tt]
Locations
---------
LocationName (PK - short text)
InstrumentLocations
-------------------
LocationName CPK (FK to the Locations Table)
InstrumentID CPK (FK to the Instruments Table)
Instruments
-----------
InstrumentID (PK)
InstrumentName
InstrumentType
[/tt]
So the problem that I'm having is that an Instrument can report more than one type of data, a Pressure or a Temperature, for example. So the combination of InstrumentName and InstrumentType forms a unique Index which is used in a Data collection table. An instrument can also appear at more than one Location, thus the many to many relationship.
I have an Excel file that relates InstrumentName to LocationName, one in each column. I can import this into a temporary table in Access 2013. How do I write a query that will update the InstrumentLocations table with this information, thus linking the Instruments table to the Locations table?
Sorry if this is confusing, I'm definitely no expert!
Thank you!!
Thanks!!
Matt
I have three tables. One called "Locations", a second called "InstrumentLocations" and a third called "Instruments". Here's the table setups:
[tt]
Locations
---------
LocationName (PK - short text)
InstrumentLocations
-------------------
LocationName CPK (FK to the Locations Table)
InstrumentID CPK (FK to the Instruments Table)
Instruments
-----------
InstrumentID (PK)
InstrumentName
InstrumentType
[/tt]
So the problem that I'm having is that an Instrument can report more than one type of data, a Pressure or a Temperature, for example. So the combination of InstrumentName and InstrumentType forms a unique Index which is used in a Data collection table. An instrument can also appear at more than one Location, thus the many to many relationship.
I have an Excel file that relates InstrumentName to LocationName, one in each column. I can import this into a temporary table in Access 2013. How do I write a query that will update the InstrumentLocations table with this information, thus linking the Instruments table to the Locations table?
Sorry if this is confusing, I'm definitely no expert!
Thank you!!
Thanks!!
Matt