I am having trouble trying to get the most recent record. heres my query
i get no results on this query. Basically what i want is if CMTCH has 4 records over 1 year. I want the most recent record.
Example
10-1-12
8-1-12
2-15-12
5-25-12
I would want the records with the 10-1-12 date.
select
a.sumjobcode, a.sumEffDate, a.sumFinalPoints,
b.jobtitle, b.DSCRIPTN
FROM tblSummary a
left outer join vDepartments b
on a.sumJobCode = b.JOBTITLE
where a.sumEffDate =(
SELECT MAX(a.sumEffDate)
FROM tblsummary a)
and a.sumJobCode = 'CMTCH'
i get no results on this query. Basically what i want is if CMTCH has 4 records over 1 year. I want the most recent record.
Example
10-1-12
8-1-12
2-15-12
5-25-12
I would want the records with the 10-1-12 date.
select
a.sumjobcode, a.sumEffDate, a.sumFinalPoints,
b.jobtitle, b.DSCRIPTN
FROM tblSummary a
left outer join vDepartments b
on a.sumJobCode = b.JOBTITLE
where a.sumEffDate =(
SELECT MAX(a.sumEffDate)
FROM tblsummary a)
and a.sumJobCode = 'CMTCH'