General information
Forum:
Microsoft SQL Server
>Thank you for your response. I have encluded a stored proc segment to show how the table is being created.
>
>CREATE TABLE Customers(
> CustomerID INT PRIMARY KEY IDENTITY (1,1) NOT NULL,
> SalesOrder INT UNIQUE NULL,
> FirstName VARCHAR(26) NOT NULL,
> MI CHAR(1) NULL,
> LastName VARCHAR(30) NULL,
> SSN BIGINT UNIQUE NULL,
> PSSN BIGINT UNIQUE NULL,
> DLN VARCHAR(20) UNIQUE NULL,
> ...
>
>Is there anything else I should be doing??
>
>Thanks
>
>Rollin
Try to add a SET ANSI_NULLS ON GO above this and recreate it. See if that makes a difference.
See, when ANSI_NULLS is ON null = null returns null, with ansi nulls off then null = null returns true, which may be why your server sees them as non-unique values.
BOb
Previous
Next
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