I have use a table to store the conditional Statement as follow.
CommissionTable
CommissionRate ConditionalStatement
0.03 Sales < 50
0.05 Sales >= 50 And Sales < 80
0.06 Sales >= 80 And Sales < 100
0.07 Sales >= 100 And Sales < 120
0.08 Sales >= 120
I want to calculate the commission when the sales revene in the above percentage.
For i = 0 To dsRate.Tables(0).Rows.Count - 1
If dsRate.Tables(0).Rows(i).Item(1).ToString() Then
Commission = salesRevenue * dsRate.Tables(0).Rows(i).Item(0)
Exit For
End If
Next
How can I extract the conditional statement in the database?
CommissionTable
CommissionRate ConditionalStatement
0.03 Sales < 50
0.05 Sales >= 50 And Sales < 80
0.06 Sales >= 80 And Sales < 100
0.07 Sales >= 100 And Sales < 120
0.08 Sales >= 120
I want to calculate the commission when the sales revene in the above percentage.
For i = 0 To dsRate.Tables(0).Rows.Count - 1
If dsRate.Tables(0).Rows(i).Item(1).ToString() Then
Commission = salesRevenue * dsRate.Tables(0).Rows(i).Item(0)
Exit For
End If
Next
How can I extract the conditional statement in the database?