熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> Oracle >> 正文

ORACLESQL判斷字符串是否為數字的語句

2013-11-13 15:43:44  來源: Oracle 

  記錄一下

  SELECT *
      FROM (SELECT TRANS_TYPE TRANS_TYPE_NAME
              FROM QGIS_TRANS_TYPE
             WHERE NVL(FLAG N) = Y
               AND DECODE((REPLACE(TRANSLATE(TRIM(SUBSTR(TRANS_TYPE_NAME ))
                                            
                                             )
                                  
                                   NULL))
                          NULL
                          TO_NUMBER(TRIM(SUBSTR(TRANS_TYPE_NAME )))) = SUBSTR(:TRANSACTIONSSEND_CC_CODE)
            UNION ALL
            SELECT TRANS_TYPE TRANS_TYPE_NAME
              FROM QGIS_TRANS_TYPE
             WHERE NVL(FLAG N) = Y
               AND DECODE((REPLACE(TRANSLATE(TRIM(SUBSTR(TRANS_TYPE_NAME ))
                                            
                                             )
                                  
                                   NULL))
                          NULL
                          TO_NUMBER(TRIM(SUBSTR(TRANS_TYPE_NAME )))) IS NULL)
     ORDER BY TRANS_TYPE


From:http://tw.wingwit.com/Article/program/Oracle/201311/17208.html
    推薦文章
    Copyright © 2005-2013 電腦知識網 Computer Knowledge   All rights reserved.