Assign unique IdentityNum to Date/Location only if same Date/Location Does NOT EXIST - SQL Server 2005
Posted on 2008-11-12
I am using the following code to assign a Date/Location to a unique IdentityNum:
Date = @Date,
Location = @Location
Where IdentityNum IN(
where ISnull(Date,'') = '' and isnull(Location,'') = '')
This works great but I want to make sure that the same Date/Location can not be assigned more than once.
Does anyone know how to do this??