I have a table in Oracle with lots of data. In the structure of:
code_value date_value value
1 20/07/2017 10.5
1 19/07/2017 11.6
2 20/07/2017 1000.22
2 18/07/2017 1700.44
I have another table that defines a test for this data: Whose structure is as follows:
code_value check_rule check_period connection_rule
1 16% w or
1 30% m or
1 50% y or
2 130% w and
2 110% 6m and
*p.s. "check_period": w - for week, m - for month, y - for year.
** p.s. I'm still debating if split this column into two columns: one for the amount of time and one for the time type (ex: 6, m).
I would like to take the test table and run it on the table with the data, on C#.
but I don't know how to start to do it:
How do I take a value from a table and use it to calculate?
for example:
if I will take the first line, with 16% check_rule, and I will do:
var a = check_rule[0];
How to check whether the increase was 16% per week?
In the same way how to use OR on "connection_rule"?
I'm really hope that my question clear enough.
Thank U!