AnsweredAssumed Answered

validate a unique combination of field values (when using a calculation field)

Question asked by JillianDunic on Sep 30, 2012
Latest reply on Feb 3, 2013 by cowtrax

Title

validate a unique combination of field values (when using a calculation field)

Post

     I have a Locations table that has the following attributes: ContainerType, ContainerName, Institution. I am using a surrogate key for my Primary key which will be an autogenerated serial integer. However, I need to make sure that the record ContainerType, ContainerName, and Institution are a unique combination. I thought that I could make a calculation field that was made up of that record and then set a constraint that it must be unique, (so that I can set a proper surrogate key) but I can't. What is the best way for me to deal with this?

     My dataset is quite large and the composite key made of these fields would be a string that is rather long. But mostly I would like to maintain using unique integer values for my primary key to be consistent with my database design. Thanks in advance. 

Outcomes