可以写一个function,把字母都过滤掉,只剩下数字,然后就可以根据数字排序了
CREATE OR REPLACE FUNCTION GETNUMBER(STR IN VARCHAR2) RETURN VARCHAR2 IS
V_TEMP VARCHAR2(200);
V_RETURN VARCHAR2(200);
IDX NUMBER := 1;
BEGIN
WHILE (IDX <= LENGTH(STR)) LOOP
V_TEMP := SUBSTR(STR, IDX, 1);
IF (ASCII(UPPER(V_TEMP)) >= 48 AND ASCII(UPPER(V_TEMP)) <= 57) THEN
V_RETURN := V_RETURN || V_TEMP;
END IF;
IDX := IDX + 1;
END LOOP;
RETURN V_RETURN;
END GETNUMBER;