473,385 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Multple Key Fields

How do you define fields so that duplicates aren't allowed based on a combination of two or more fields, but it's ok to have duplicates in any one of the fields? So for example:

Permit Number is a field and Amendment Number is a field in the Amendment table. There can be no duplicates of the Permit Number in the Permits table - that's no problem.

But in the amendment table I can have amendment nos 1,2 and 3 for Permit number 1 and amendment nos 1,2 and 3 for permit number 2, etc., but of course I can't repeat the same amendment number for any one permit.

It seems like all I can do is allow duplicates or disallow them for each specific field, rather than a group of fields. I know there has to be an easy way, but I can't seem to figure it out.

Thanks.
Oct 28 '08 #1
2 1054
Hi

It looks like you need joined primary key on two fields or you can achieve the same using 'indexes' button in table design view just specify index name (once) + unique property set to yes and include index fields (your 2 fields)

I Hope it helps
Emil
Oct 28 '08 #2
Hi

It looks like you need joined primary key on two fields or you can achieve the same using 'indexes' button in table design view just specify index name (once) + unique property set to yes and include index fields (your 2 fields)

I Hope it helps
Emil
Thanks.
Oddly, that's (the first way) what I was doing, but it wouldn't work. I deleted the table and started from scratch and it worked fine.
Oct 28 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Tim Cowan | last post by:
Hi I am trying to create a CSV file with some fields in double quotes ("). I am not having any luck. This is what I want; "8684","COSTING","000010001","REG",X4,15.00, ,14,0,14,9,6 I am...
0
by: bill mahoney | last post by:
I have access 2k and I have 2 tables. One is a 7X6 table representing a month with zeroes padding the fields where no day exist. For example February 2003 0 0 0 0 0 0 1 2 3 4 5 6 7 ...
4
by: Melissa | last post by:
I have a frontend file named CustomerApp and backend file named CustomerData. CustomerApp is at C:\Customer Database and CustomerData is at S:\Customer Database. Could someone help me with the code...
5
by: Megan | last post by:
Hi everybody- I'm helping a friend with a music database. She has an old one and is creating a new one. She wants to compare records and fields in the old database with records and fields in the...
5
by: Genboy | last post by:
My "VIS" Website, which is a C# site created in VS.NET, Framework 1.1, is no longer compiling for me via the command line. As I have done 600 times in the last year and a half, I can compile to...
1
by: charmgirl | last post by:
hi, is it possible to have multple forms in a page. if yes than how to read data from multople forms ?
482
by: bonneylake | last post by:
Hey Everyone, Well i am not sure if this is more of a coldfusion problem or a javscript problem. So if i asked my question in the wrong section let me know an all move it to the correct place. ...
1
by: kayox007 | last post by:
hello everyone, please i need help, i intend uploading 5 pictures all at once with each file fields named pic 1 to pic 5, the first field is compulsory , but am finding it hard getting their file...
5
by: KingKen | last post by:
I have a situation whereby I have to enter many records in a db that only have one field that changes. For example software installed on a computer would give you many different rows of data with...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.