Hi,
I have a SQL 2000 database with a table that I'd like to set a constraint on one of the columns, based on data contained in another column.
The column whose data needs to be constrained is a bit type column with a default value of 0. For discussion, I'll call it box_1. The only time I want to allow box_1 to be flipped to a 1 is when the controlling column named car_type contains the value 'F' or 'W'.
Will someone please help me with the expression that I should put in the constraint expression box for the table in question?
Michael
I have a SQL 2000 database with a table that I'd like to set a constraint on one of the columns, based on data contained in another column.
The column whose data needs to be constrained is a bit type column with a default value of 0. For discussion, I'll call it box_1. The only time I want to allow box_1 to be flipped to a 1 is when the controlling column named car_type contains the value 'F' or 'W'.
Will someone please help me with the expression that I should put in the constraint expression box for the table in question?
Michael