Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2011
    Posts
    20

    Unanswered: How to write SQL Query

    Hi everyone,

    I am having data in table like,

    Project code project name associates timeeffortsday
    1 Analytics amol,manisha,sayali,pooja (21+17+20+17)=57


    So , i need to calculate time effors in day, so i have done it for february month and i have added each persons days he has worked in that month.. mean i have minus absentee of any day of all associates.
    So, I need to do this by Sql Queries.
    I am having one table which contains all associates presentee with dates.
    like,
    UID username date

    So can any one give me the suggestion how would i do this??


    Thanks in advance
    Waiting for response

  2. #2
    Join Date
    Apr 2008
    Location
    Iasi, Romania
    Posts
    561
    Provided Answers: 2
    Do you mean that you have several values on the same field? (e.g. for associates field you have amol, manisha, sayali, and pooja on the same row???)
    In that case your table is not normalized so it will be really hard to do your calculation with SQL.
    Florin Aparaschivei
    DB2 9.7, 10.5 on Windows
    Iasi, Romania

  3. #3
    Join Date
    Nov 2011
    Posts
    20
    no no it is normalized only... tht first table is output of joining of 2 tables i need to calculate time efforts from other given table

  4. #4
    Join Date
    Sep 2010
    Posts
    153

    Smile

    If the table is normalized and the data is the output of joining two tables then why don't you fetch data from two main tables by joining them instead of putting data into your thirs tabldE? I guess, that would be better.

  5. #5
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Please provide full details of your table, sample data and desired results.
    George
    Home | Blog

  6. #6
    Join Date
    Nov 2011
    Posts
    20
    i am having these 2 tables,,,
    so i want result like

    Project code associates timeefforts
    1 ajay, onkar , sayali (18+19+19)=56

    for february month
    Attached Thumbnails Attached Thumbnails 1.png   2.png  

Posting Permissions

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