[dba-SQLServer] Enforcing a rule

Rocky Smolin rockysmolin at bchacc.com
Sun Aug 28 18:52:11 CDT 2011


I would use the Before Update event of the form to verify that at last
choice was made.  

Rocky


-----Original Message-----
From: dba-sqlserver-bounces at databaseadvisors.com
[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of jwcolby
Sent: August 28, 2011 3:41 PM
To: Sqlserver-Dba
Subject: [dba-SQLServer] Enforcing a rule

I have a table where the client is either a parent type (from a list of
parent types) or a professional type (from a list of professional types).  I
need to enforce that at least one of the fields is filled.  IOW both cannot
be null, but either one can be null or both can be filled.

How do I do something like that?  I have never used database level
constraints other than pk/fk so I do not know how to set something like this
up.  Any detailed instructions or a pointer to a web page would be
appreciated.

Thanks,

--
John W. Colby
www.ColbyConsulting.com
_______________________________________________
dba-SQLServer mailing list
dba-SQLServer at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
http://www.databaseadvisors.com





More information about the dba-SQLServer mailing list