Finding rows that don't contain numeric data in Oracle

前端 未结 9 556
陌清茗
陌清茗 2020-12-09 17:00

I am trying to locate some problematic records in a very large Oracle table. The column should contain all numeric data even though it is a varchar2 column. I need to find

9条回答
  •  感情败类
    2020-12-09 17:03

    Use this

    SELECT * 
    FROM TableToSearch 
    WHERE NOT REGEXP_LIKE(ColumnToSearch, '^-?[0-9]+(\.[0-9]+)?$');
    

提交回复
热议问题