ROW_NUMBER() over( order by GETDATE()) as Xh,

SELECT * FROM (

SELECT sEmployeeNo,ROW_NUMBER() over(partition by dbo.GetNoFromStr(sEmployeeNo)

order by dbo.GetNoFromStr(sEmployeeNo)) as RowIndex,

dbo.GetNoFromStr(sEmployeeNo) aa, sEmployeeNameCN FROM hrEmployee

GROUP BY sEmployeeNo,sEmployeeNameCN

) a WHERE RowIndex>1