Viewing post 1 (of 1 total)
with cte as(select id,Doctype,DocName,[Priority], StartDate,[finalDoc],RANK() over (partition by DocName order by [Priority] asc,StartDate desc) as r_nofrom #t) SELECT id,Doctype,DocName,[Priority], StartDate,[finalDoc] from cte...
August 30, 2017 at 10:14 am
#1957508