I found an article that is very similar to how I would like to apply business rules to update my table. I will have 4 colname values I would like to use:
Channel -- Will be only 2 values
ShipFrom - Could be single entry, or ALL, or ALL except(xx,xx,xx)
Prodline -- All(*), or using a Like 5%
Custtype - Could be empty,Single value, or a string of values(444,321,999)
I'm trying to figure out how do define the Operator field based upon the different rules since it's not as easy as equal(=) to this value. Some will need to use Like, or In, or maybe even NOT IN.
Looking for suggestions, maybe an alternative approach, or sample Inserts to define the different rules.
Create table tblBusRule
RuleID int Primary key not null,
ColName varchar(20) not null,
Operator varchar(2) not null,
ColValue varchar(10) not null,
RuleOrder int not null