Results 1 to 7 of 7
  1. #1
    Join Date
    Jul 2003
    Location
    The Dark Planet
    Posts
    1,401

    Unanswered: 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 ??
    Get yourself a copy of the The Holy Book

    order has no physical Brett in The meaning of a Kaiser . -database data

  2. #2
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Is the bonus distributed evenly to all the boss's employees regardless of the number of days they were employed?
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  3. #3
    Join Date
    Jul 2003
    Location
    The Dark Planet
    Posts
    1,401
    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.
    Get yourself a copy of the The Holy Book

    order has no physical Brett in The meaning of a Kaiser . -database data

  4. #4
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    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.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  5. #5
    Join Date
    Jul 2003
    Location
    The Dark Planet
    Posts
    1,401
    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
    Get yourself a copy of the The Holy Book

    order has no physical Brett in The meaning of a Kaiser . -database data

  6. #6
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Up all night, and then still went to (stayed at) work?

    I hope you're hourly....
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  7. #7
    Join Date
    Jul 2003
    Location
    The Dark Planet
    Posts
    1,401
    Hmm .. would love to do hourly .... but my bad luck .. am on a fixed salary
    Get yourself a copy of the The Holy Book

    order has no physical Brett in The meaning of a Kaiser . -database data

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •