Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unique Nullable values??
Message
From
04/09/2002 21:29:45
 
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
00696335
Message ID:
00696923
Views:
11
>>>The SQL Server Books Online says the NULL values are not '=', but when I set up a Nullable Unique field, and try to import data into it, I get a 'Violation of UNIQUE KEY constraint'. If I turn the constraint off, it works OK, but I need the constraint, and I need it to be Nullable.
>>>
>>>Am I going to be able to do this??
>>>
>>>Thank You in advance!
>>>
>>>Rollin
>>
>>Hmm... according to SQL Books Online... you CAN do this:
>>
>< snip >
>
>According to BOL Creating a Unique Index:
>
>Note You cannot create a unique index on a single column if that column contains NULL in more than one row. Similarly, you cannot create a unique index on multiple columns if the combination of columns contains NULL in more than one row. These are treated as duplicate values for indexing purposes.

Hmm... there it is, seems to contradict the areas I quoted. Ok, then it can't be done, there is the answer....

Sorry, my bad.

BOb
Previous
Reply
Map
View

Click here to load this message in the networking platform