reporting services - Query data for the last day of previous month into SSRS Report Cell -
i'm in process of building report , i'm stuck 1 requirement. 2 of columns in output of stored procedure accomplishments
, updatedate
. have write expression accomplishment field such takes accomplishments
values corresponding latest date in previous month in updatedate
column..
there multiple accomplishment
values every month , of them updated @ different dates.. please help..
this did:
' select * (
select row_number() on (partition projectid order updatedate desc) rn, *
from tablename
where updatedate between dateadd(mm, datediff(mm, 31, getdate()), 0) , dateadd(mm, datediff(mm, 0, getdate()), 0)'
) x
where rn = 1
courtesy naomi n msdn forums..
Comments
Post a Comment