1 Replies - 1270 Views - Last Post: 18 June 2014 - 08:29 AM Rate Topic: -----

#1 Thinus du Pisanie  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 107
  • Joined: 07-October 11

Reallocate Weights

Posted 18 June 2014 - 04:00 AM

Good day

I am struggling with a problem and can't seem to wrap my head around it.

I have 2 tables.

KPA

Datafields
Perf_KPA_ID (Primary key)
Emp_ID
KPA_ID

KPA_KPI

Datafields
ID (Primary key)
Perf_KPA_ID
KPI
Weight
Result

The entries looks like this.

KPA Table
1__EMP1__KPA1
2__Emp1__KPA2
3__Emp2__KPA1

KPA_KPI
1__1__KPI1__5__1
2__1__KPI2__10__0
3__1__KPI3__5__2
4__2__KPI4__5__3
5__2__KPI5__5__0

Now what I want to do is the following:

If the Result is 0 and the Weight is < 5 then the Weight of that KPI must be divided into the KPI's where the Perf_KPA_ID is the same and the result is not 0 and the Weight of that KPI must become 0

If the Result is 0 and the Weight is > 5 then the Weight of that KPI must be divided into all the KPI's where the Emp_ID is the same in this case EMP1 and the result of any KPI's in that KPA_KPI table is not 0 and the Weight of that KPI must become 0

Any assistance will be greatly appreciated.

Is This A Good Question/Topic? 0
  • +

Replies To: Reallocate Weights

#2 trevster344  Icon User is offline

  • The Peasant
  • member icon

Reputation: 224
  • View blog
  • Posts: 1,507
  • Joined: 16-March 11

Re: Reallocate Weights

Posted 18 June 2014 - 08:29 AM

What have you tried?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1