Want to eliminate Duplicate Values <> Null

B

Ben

I know how to make a column prevent duplicate values with
an index; however, I have a column where many values are
null which is OK, but I can't use an index to prevent
duplicate entries because it will only allow me one
record with the null column value.

Does anyone know of a work around where I can root those
out and at least pop up a warning to the person entering
the record that the value exists in another record?

Thanks in advance,

Ben
 
J

John Vinson

I know how to make a column prevent duplicate values with
an index; however, I have a column where many values are
null which is OK, but I can't use an index to prevent
duplicate entries because it will only allow me one
record with the null column value.

Set the IgnoreNulls property of the Index (which cannot be a Primary
Key index, since PK's cannot contain null) to True.
 

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