[dba-SQLServer] Enforcing a rule

jwcolby jwcolby at colbyconsulting.com
Sun Aug 28 20:47:06 CDT 2011


I can certainly do that but I am hoping to learn how to use the SQL Server engine to do these things.

John W. Colby
www.ColbyConsulting.com

On 8/28/2011 7:52 PM, Rocky Smolin wrote:
> 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
>
>
> _______________________________________________
> 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