General information
Forum:
Microsoft SQL Server
>>>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only