Im using SSRS 2005, and i have a table thats getting me my correct data.
I have this in my one of my fields:
=IIF(Fields!ReceiptQuantity.Value < AVG(Fields!ReceiptQuantity.Value) -14,Fields!ReceiptQuantity.Value,"")
and in my details row in the visibiltiy i have this...
That is what i have, i get 4 records returned. All with 4 different dates, i want the most recent record.
select
a.sumjobcode, max(a.sumEffDate), a.sumFinalPoints,
b.jobtitle, b.DSCRIPTN
FROM tblSummary a
left outer join vDepartments b
on a.sumJobCode = b.JOBTITLE
where a.sumJobCode = 'CMTCH'...
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...
i was able to find this and it seems to work. not sure whats different than ive already tried.
SELECT *--,MIN(formatdate)
FROM bk_vAPTData
WHERE formatdate>=DATEADD(d,DATEDIFF(d,0,GETDATE())-1,0) AND
formatdate<DATEADD(d,DATEDIFF(d,0,GETDATE())+0,0)
Neither of the last 2 posts got me what i need.
Boblarson i still only get 9-20-12 data and not yesterdays 9-19-12
and SQL_hell i dont get any results from you.