INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Table with an internal unique combination?

Table with an internal unique combination?

(OP)
I have a table called "Instrumentation". Each instrument has a unique ID (e.g. AI101, AI102, AI456, etc.) but can report more than one type of data. For example, a particular instrument can report Flow, Temperature and Pressure. I need to be able to differentiate this feedback in another table that shows the time stamp of each reported value. In a way, I'm sort of setting up a Historian (if you're familiar with that sort of thing).

So, for example, AI101, reports a Pressure value of 15 at 9:01 AM, then reports a Temperature measurement of 120 at 9:02 AM, then a Flow measurement of 500 at 9:03 AM.

I thought about setting the table up as follows:

InstrumentID (PK)
InstName
Type

So the Instrument Name would be AI101, and the Type could be Pressure, Temperature, or Flow. You cannot have the combination of AI101, Pressure more than once.

To further confuse the issue, there are many Locations where you can find AI101, Pressure.

How do I ensure that I do not have the combination of AI101, Pressure more than once in my table?


In case it's important, the InstrumentID would be a Foreign Key in another table called RunData, where the setup would be:

RunDataID (PK) - Unique ID for the entry in the table
TimeStamp - the time that the data was reported
InstrumentID (FK) - relates back to the Instrumentation table
FieldValue - the value that was reported


Thank you for your help!!

Thanks!!


Matt

RE: Table with an internal unique combination?

(OP)
I believe I found my answer. I need to create an individual index in Access and add the two fields to it.

This post here led me to my answer: http://stackoverflow.com/questions/6440703/ms-acce...

When doing this in Access, you need to make sure that you change the options at the bottom of the pop-up window to include "Unique" to indicate "Yes".

Hope someone else finds this information useful.

Thanks!!


Matt

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close