oracle里面判断字符串是否纯数值 

select case when length(colxxx)=11  and  length(regexp_substr(colxxx,'[0-9]+')) = 11 then to_date( SUBSTR(colxxx),'yy-MM-dd') 
when length(colxxx)=14 and length(regexp_substr(colxxx, '[0-9]+')) = 14  then to_date( SUBSTR(colxxx),'yyyy-MM-dd') 

from tablexxx

更多推荐