Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)

  • RE: need help

    Do you need the last employee id has 2 different end dates. isn't it

  • RE: need help

    Use this. This will give ur exact output

    SELECT x.EmpID,x.StartDate,x.EndDate

    FROM(SELECT EmpID,MIN(startdate) AS startdate ,MAX(enddate) AS EndDate FROM Duration where EmpId=3

    group by EmpId UNION SELECT EmpID, MIN(startdate),MAX(ISNULL(enddate,Getdate())) As...

Viewing 2 posts - 1 through 2 (of 2 total)