Index question

S

SKB

I am trying to use an index to allow only unique entries. If I use two
columns it works. When I try to add a third column it doesn't.

Lets say I have

Column 1 2 3 4 5 6


and I want columns 4,5 and 6 to control what is unique.

For example:

Column 1 2 3 4 5 6
1 a a a
2 a b a
3 a c a
4 a a
5 b a a
6 b a
7 a a b
8 a b

These are all unique but, if I add a record..

Column 1 2 3 4 5 6
new b a

it doesn't call it a duplicate and allows the entry. There are null
fields in column 5 but, there will always be values in columns 4 and 6.

Can this be done? What would make it not work if it can be done?

Thank you,
SKB
 
D

Douglas J Steele

Due to the nature of Null, I don't believe that a field which can contain
Nulls can be used in unique indexes.
 
Top