Help with Indexes and Duplicates!

kyle18

New member
Local time
Today, 03:38
Joined
Aug 12, 2011
Messages
9
Hi to everyone!

Have simple(as I think) question! Simply I can't find correct answer on the forum, have searched, but don't understand.

I have two related Tables
tblClientOrder
ClientOrder ID(no duplicates); OrderDate; OrderType; Contractor

tblClientOrderDetail
ClientOrderDetailID; ClientOrderID; Article; Quantity


Tables are related by ClientOrderID.

The problem is that field [Article] must not contain duplicates within one order (where [ClientOrderID] is the same) I can't make it indexed as then I can't add same [Article] into the next Order. (where [ClientOrderID] is NOT the same)

Thanks in advance and sorry if that was discussed simply can't find.
 
You can make an index on the combination of the two columns and make that unique, that should fix your problem for you.
 
Can you be more specific at how you make it?

Thanks!
 
I found it..
Thanks for reply, sometimes it is one word which makes the difference!!
 
How specific do you need me to be? You go into table design, go into your indexes by clicking the index button.
Create a new index add the columns required and set them to "Unique = Yes"
 

Users who are viewing this thread

Back
Top Bottom