I\'ve got a Postgres ORDER BY issue with the following table:
ORDER BY
em_code name EM001 AAA EM999 BBB EM1000 CCC
To insert a
you can use just this line "ORDER BY length(substring(em_code FROM '[0-9]+')), em_code"