>>Is this VFP or TSQL? Because convert(..., 101) looks like TSQL, and I'm not sure „order by 1“ is allowed in TSQL. Last time I tried you had to repeat the whole expression in the order by clause.
>Yes, sql server supports order by 1, I don't remember last time when I used VFP. :)
Emphasis on „last time I tried“, which was some years ago, and never bothered to check if newer versions allowed numbers, because there was always some customer with the old version, and nobody wants to code for version specific features.
BTW, just checked, Postgres 12 also allows for numeric order by.