I think this function can't to help me, because i want to return row index. (all data not duplicate).
CTE use to count all record total?
for example. TableSys.
Sysid Sysname
row1 1 a
row2 2 b
row3 5 c
row4 6 d
row5 9 e
select ??? form tablesys where sysname ='d'
I want to return string 4 (because d is record 4 in this table )