row_number() over(order by ...)

select t.rowid, t.vchno, ROW_NUMBER() OVER(ORDER BY to_number(t.vchno) ASC) AS

select t.rowid,
t.vchno,
ROW_NUMBER() OVER(ORDER BY to_number(t.vchno) ASC) AS XUHAO
from t_glvoucherfm t
where t.hsagency = ‘308’
and t.term = ‘12’
order by to_number(t.vchno);