Friday, 6 September 2013

dynamic operator comparison from table fields

dynamic operator comparison from table fields

this is my first post..please go easy on me
i have 2 tables, discount profile and transaction
in my discount table i have fields : - fields for operator (equal,
greather, less, greater equeal, less equal) - field for discount amount -
field priority
in transaction table i has transaction amount
my question are: 1. how to select highest priority discount profile that
fulfill clause( transactionamount operator discount amount)
eg: profile 1: operator less than, discount amount 300, priority 1 profile
2: operator greater than, discount amount 500, priority 2 profile 3:
operator greater than, discount amount 750, priority 3
transaction amount: 800.
profile match: profile 2 and profile 3. profile selected: profile 2
Thanks

No comments:

Post a Comment