Click to See Complete Forum and Search --> : SQL Server UNIQUE constraint
panayotisk
March 1st, 2004, 08:08 AM
Hi,
I want to create a constraint on a field.
I need uniqueness as long as the field is not null (allow multiple nulls).
How am I going to do this?
hspc
March 7th, 2004, 12:59 PM
I believe you can't..
you can create a triggers to handle this setuation..
one trigger for insert and the other for update.And check if the data violates your rules.
panayotisk
March 15th, 2004, 06:10 AM
Yes, it is true. The problem I'm having now is actually make this trigger work since I need to use dynamic SQL. I posted this in another thread.
Thanx a lot
Panayotis
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.