I want to sort my result by a column that I actually create temoprarly
SELECT A, B, @MID(C,2,2) as X FROM foobar ORDER BY X DESC
I know this would work in MySQL but it doesn't seams to work in SQL (SQLBase).
Any suggestions?
I tried:
SELECT A, B, @MID(C,2,2) as X FROM foobar ORDER BY @MID(C,2,2) DESC
Result was Invalid Columnname
same as using ORDER BY X