I have set of hundreds of business rules that I need to executed based on certain criteria. Just for example
If product =A
- Code > 5 (code should be greater then 5)
- Height > 10
- Width >5
If product = B
- Height > 8
- Width >7
I want to return the error message when condition doesn’t match. I want to store this rules/condition in database so I can execute based on input parameter (product) and add new rule to database as needed.
I can add cursor to loop record but I am not able do condition statement (if, else) runtime. (for selected condition coming from database)
If(condition1) ---this is not working in SQL
exeStatus = ‘Success’
exeStatus =’Height cannot be less than 5’
Any suggestion how can I store condition and execute them on run time ?