My scenario is the following: (SQL Svr 7.0)
I have a table that contains (among others) a column "MyColumn" that up to now it has been defined as NULL due to business rules.
So, although this column can indeed allow null values, however I would like to create a UNIQUE constraint to it, so that every value placed on it is unique, except <NULL> of course.
As far as I read on Books Online, that can supposedly be done. However, when I navigate into the table's design, then on Properties, I attempt to create it as a UNIQUE CONSTRAINT (not index), but the system doesn't allow it, remarking that there is a duplicate value, which is the <NULL>.
I also try it by means of the Query Analyzer, get the same error.
Could anyone help?
I have a table that contains (among others) a column "MyColumn" that up to now it has been defined as NULL due to business rules.
So, although this column can indeed allow null values, however I would like to create a UNIQUE constraint to it, so that every value placed on it is unique, except <NULL> of course.
As far as I read on Books Online, that can supposedly be done. However, when I navigate into the table's design, then on Properties, I attempt to create it as a UNIQUE CONSTRAINT (not index), but the system doesn't allow it, remarking that there is a duplicate value, which is the <NULL>.
I also try it by means of the Query Analyzer, get the same error.
Could anyone help?