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

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

2022-06-13   來源: 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-2022 電腦知識網 Computer Knowledge   All rights reserved.