Wednesday, March 28, 2012

Its been a looooong day ! Need help

Ok .. here's another problem I am facing ...
Its been a long day and my mind is really not working

I have three tables lets say

tab1
---
boss
month
Bonus

tab2
---
boss
employee

Each Boss is given some bonus amount ... he has to distribute it evenly among his employees. data for each boss monthly bonus is availible.

But what i need is amount per employee per day (and remember amount being recieved will vary upon bonus amount with boss aND NO OF day in month). I need to generate a tabe for the whole year containing records

taboutput
----
boss
employee
date
amount



Any Ideas ??Is the bonus distributed evenly to all the boss's employees regardless of the number of days they were employed?|||Thats another story ... its just a problematic representation of what i ve to do ...

A better analogy would be a target for the territory, and i need a daily volume for salespersons working in that territory ...

Lets say The data is given at Territorywise , Month level for the year and i need to split it at Salesperson, Day level for the year

So the problem now stands as

Tab1
--
Territory
Month
Target

Tab2
---
Territory
Sales_Person

Result needed as
TabOutput
-----
Territory
Sales_person
Date
Target

Its like i should be able to get the target till date for the salesperson for any date specified.|||Yes, but its important to know whether the number of salespeople in a territory can change from month to month, and where this information is stored. I suspect the reasons this is giving you trouble are
1) You are dead beat tired
and
2) You don't have all the information required to solve the problem

I worked in a sales organization for three years developing territory and compensation models for sale people. Their territories would change several times each year.|||Originally posted by blindman
Yes, but its important to know whether the number of salespeople in a territory can change from month to month, and where this information is stored. I suspect the reasons this is giving you trouble are
1) You are dead beat tired
and
2) You don't have all the information required to solve the problem

I worked in a sales organization for three years developing territory and compensation models for sale people. Their territories would change several times each year.

It was reason no 1... did have to take 7 cups of coffee to keep myself awake during the night ... Thanks .. have solved the problem for now :)|||Up all night, and then still went to (stayed at) work?

I hope you're hourly...|||Hmm .. would love to do hourly ... but my bad luck .. am on a fixed salary :(sql

No comments:

Post a Comment