Jump to content

Query display pbm


shan_cool

Recommended Posts

Hi All,
I have a query and it displays set of records.. but i hav a pbm wit it. there will b one or more records for a particular employee.. but i need to display a single record for each of them which has the maxmimum m.startdate.....

my query is

select e.Emp_Id,e.Emp_FName,e.Emp_LName,e.Emp_Ug_Deg,e.PG_Deg,e.Emp_Desgn,e.Emp_DOJ,e.Base_Location,e.Emp_Ug_Year,e.PG_Year,i.Emp_Id,i.Test_Exp,i.Dev_Exp,i.Other_Exp,p.Prj_Code,p.Project_Name,p.Client,p.Location,m.Prj_Code,m.Emp_Id,m.Start_Date,m.End_Date,m.cty from HR_Emp_Det e,skill_master i,tdm_proposal p,tdm_prj_mem_det m where e.Emp_Id=i.Emp_Id and i.Emp_Id=m.Emp_Id and p.Prj_Code=m.Prj_Code and e.Emp_Status <> 'R' order by m.Emp_Id,m.Start_Date Asc


no it shows as:
for example.....

101 |Sridevi |Senior Test Engineer |04-Apr-2003 |2.92 |2.66 |5.66| 1.25| 0.25| 7.16 |B.Sc.,MCA| 2001 |Available |India |Trade Finance - Polaris| Nil |Mumbai |01-Jun-2004 |31-Dec-2004

101 |Sridevi |Senior Test Engineer |04-Apr-2003 |2.92 |2.66 |5.66 |1.25| 0.25 |7.16| B.Sc.,MCA |2001 Available |India |Constact Contact Genesis |Nil |Bangalore |14-Feb-2005 |31-Aug-2005

BUt I nedd to display only

101 |Sridevi |Senior Test Engineer |04-Apr-2003 |2.92 |2.66 |5.66 |1.25| 0.25 |7.16| B.Sc.,MCA |2001 Available |India |Constact Contact Genesis |Nil |Bangalore |14-Feb-2005 |31-Aug-2005
because 14-Feb-2005 is greater.. tell me how to change my query

Rgds,
Shan.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.