Re: Primary Index and Null values
- From: "Anthony England" <aengland@xxxxxxxxxx>
- Date: Tue, 21 Mar 2006 15:02:26 +0000 (UTC)
"paii, Ron" <paii@xxxxxxxxxxxxxx> wrote in message
news:k_udna5vPuiRjr3Z4p2dnA@xxxxxxxxxxxxxx
"Anthony England" <aengland@xxxxxxxxxx> wrote in message
news:dvp2m1$p9v$1@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
"Cyberwolf" <jgaylord@xxxxxxxxxxxxxxxx> wrote in message
news:1142949390.803387.22920@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Is there a way to set a primary index to ignore Nulls and if so how
would I do it. I have already tried setting it so it is not a required
field, but that does not work. It states that the field can not
contain null values.
You cannot do this for your primary key.
If you want a field to have a unique index but ignore nulls, then you can
have this but it is not the primary key. Just set the properties:
Required=No
Indexed=Yes (No Duplicates)
(No Duplicates) could fail if more then one record had Null in the field.
Also any new records after the 1st Null would require a value for the
insert
to succeed.
I just created a table with two fields:
F1 = Long Integer, Not Required, Indexed No Duplicates, Not Required
F2 = Text, Required, Do Not Allow Zero Length, Not Indexed
I could enter the following records:
ID F1
1 ABC
Null DEF
Null GHI
2 ABC
However, any attempt to add another record with ID=1 or ID=2 is rejected.
Could you be mistaken in your assertion?
.
- Follow-Ups:
- Re: Primary Index and Null values
- From: paii, Ron
- Re: Primary Index and Null values
- References:
- Primary Index and Null values
- From: Cyberwolf
- Re: Primary Index and Null values
- From: Anthony England
- Re: Primary Index and Null values
- From: paii, Ron
- Primary Index and Null values
- Prev by Date: Re: Primary Index and Null values
- Next by Date: error 2108 in beforeupdate event
- Previous by thread: Re: Primary Index and Null values
- Next by thread: Re: Primary Index and Null values
- Index(es):
Relevant Pages
|