G
Guest
I need to have commissions calculated a number of different ways.
I'd like the actual calculations stored in a table, ...I think.
Then the user can select which calculation to use, the code gets sucked
into....
the calculations are made and everyone is happy.
Is there a way to do this?
Table:
ID Desc Calculation
1 level1 income.amount=select sum(sales.amt) where .....;
rate= select sales.person from salespeople where id=
'john';
commission.paid=income.amount * rate;
insert into paid.commissions values sales.person,
date, rate,
income.amount, commission.paid;
I'd like the actual calculations stored in a table, ...I think.
Then the user can select which calculation to use, the code gets sucked
into....
the calculations are made and everyone is happy.
Is there a way to do this?
Table:
ID Desc Calculation
1 level1 income.amount=select sum(sales.amt) where .....;
rate= select sales.person from salespeople where id=
'john';
commission.paid=income.amount * rate;
insert into paid.commissions values sales.person,
date, rate,
income.amount, commission.paid;