Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Specifying One Field for Unique Value

Status
Not open for further replies.

vepz

Technical User
May 3, 2005
30
US
I have a list of part numbers and varying characteristics of the part in a table. I would like to be able to produce a list of unique part numbers along with the characteristics. I can create a query with a single field part number to determine the unique values of part numbers. As soon as I tie it to the characteristic table, I get more entries than I want. I have crated a 1 to many relationship but it is not function like belive it should. Can I include the entire table of part numbers and caharacteristic and somehow select the part number field to be unique?
 
You didn't post your table structures for clarity.
I'll assume a part can have multiple characteristics.
Can a characteristic belong to more then one part? I'll assume so. So you have a many-to-many relationship. You need a junction table.
Thus:
tblPart
PartID
Description
other part info

tblCharacteristics
CharID
Description

tblPartChar
PartCharID
PartID
CharID
other COMMON fields

So with tblPartChar, you can query on a single part and get all its characteristics.

See:
Fundamentals of Relational Database Design
 
Is there a way to create the extra tables required rather than re enter all of the data?
 
Select a table, click Tools - Analyze - Table. This will start the Table Analyzer which may help.
Or Create the tables and just do a copy/paste routine.
Or you can run Append queries.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top