Automated Primary Key

Z

Zelgrath

I have 3 fields named JobId(integer), StationId(text), and
Year(integer). I also have a field, Occurance(integer),
which tracks how many duplicates have occured. I want to
make a procedure which concatenates the values in the
form "JobID-StationID-Year-Occurance" to generate a
primary key.

Where would I put code to do this? How would I check if
the first 3 values exist and increment occurance to a
suitible value.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top