I need to create a Unique Index based on an integer field plus the year component of a date field.
Does anyone know if something like this is possible
CREATE UNIQUE NONCLUSTERED INDEX Formid ON dbo.tblMoth
select (Form,datepart(yyyy,MothAdmi)) WHERE Form IS NOT NULL;
GO