Results 1 to 3 of 3


  1. #1
    Asheesh Vashishtha Guest

    Default SQL QUERY

    i'm facing problem in formulating a query.I have to list number of people who are available during a current period.this period is the start date and the end date between which the employee is available. The back ground is that an employee can work on more than one project at a time. He/she may have different percentage of utilization working in that project but at no point of time will the %utlization be greater than 100.Now if i have to select the list of employees who are available from say a particular date to another particular date. the employee availability will be checked against his project start date and project end date. also since an employee can work on more than one project he/she will have different start dates and end dates for different projects so his/her % utilization will be different. what i have to find out is to formulate a query which gives me a list of available persons along with their % of utilization during the start date and the end date which will be entered by me.The check against availability will be made against the project start and end dates of different projects the employee is currently working on moreover with the constraint that % of utilization should be less than 100. please help me.

  2. #2
    Join Date
    Dec 1969

    Default RE: SQL QUERY

    Can you show how many tables(names) and fields you use to get result.And what result do you need??<BR>

  3. #3
    Asheesh Vashishtha Guest

    Default RE: SQL QUERY

    My tables is Employeeproject in which the fields are<BR>EmpId-foreign Key id that belongs to the employee table.<BR>ProjId-foreign Key id that belongs to the project table.<BR>Note: One Employee can work on multiple projects at the same time so the actual structure of the table is<BR><BR>Empid ProjId ProjRole %utilization startdate enddate Projstatus<BR> 91 62 tester 40 01/01/2001 03/31/2001 In Progress <BR> 91 63 Programmer 60 02/02/2001 08/31/2001 In Progress <BR> <BR>likewise there are N number of employees who are currently working on different projects each under different start dates and end dates.so if i need to find out the availability of employees within any given time period with a start date and an end date.i should get the list of employees along with their remaining %utilization which is calculated from the entered start date and end date.<BR><BR>the result i should get is <BR>empid %utilization( remaining utlization during the period that we&#039;ve asked for)<BR> 91 30<BR>

Posting Permissions

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