select * , Row_number() OVER(PARTITION BY rolecode ORDER BY ID) AS [Sl.No] from ( select distinct ID,RoleCode,projcode from tab1 where rolecode='ALE' and projcode='268' ) as s
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)