Hello. I am working with CR9 and am using a informix db via an odbc connection and linking that to a csv file.
I am only using one table from my database and it has two columns. One column is type, and the other is balance.
I am dealing with leave balances and types. We have 3 types of absences.
1. Sick
2. Accumulated Sick
3. Vacation
Each of these has a type (1,2,or 3) and a correcponding balance. The csv file contains absences throughout the month. This file is created externally and then sent to me.
Here is an example of one employee:
Employee 1 has 10 sick days and 15 accumulated sick days. He uses 20 days one month. I need to reduce first his sick days (type 1) by 10 days and then reduce his accumulated sick (type 2) by the remainder. After all of this takes place his balance in type 1 will be 0 and type 2 will be 5.
I would like to do the following with a formula but am not sure how to get started.
The formula should display the balance for vacation days(type 3) as is, straight from the db.
For sick days, it should result in the addition of the balance from type1 and type2.
Not sure how to get started with this formula.
Any help will be appreciated.
Thanks.
I am only using one table from my database and it has two columns. One column is type, and the other is balance.
I am dealing with leave balances and types. We have 3 types of absences.
1. Sick
2. Accumulated Sick
3. Vacation
Each of these has a type (1,2,or 3) and a correcponding balance. The csv file contains absences throughout the month. This file is created externally and then sent to me.
Here is an example of one employee:
Employee 1 has 10 sick days and 15 accumulated sick days. He uses 20 days one month. I need to reduce first his sick days (type 1) by 10 days and then reduce his accumulated sick (type 2) by the remainder. After all of this takes place his balance in type 1 will be 0 and type 2 will be 5.
I would like to do the following with a formula but am not sure how to get started.
The formula should display the balance for vacation days(type 3) as is, straight from the db.
For sick days, it should result in the addition of the balance from type1 and type2.
Not sure how to get started with this formula.
Any help will be appreciated.
Thanks.