简体   繁体   English

Oracle SQL查询返回与没有数字的列值匹配的行

[英]Oracle SQL query to return rows that matches a column value having not a digit

I am using the following Oracle SQL query to list down the rows for a column that has values other than digits. 我使用以下Oracle SQL查询列出具有除数字以外的值的列的行。

select * from XXX_ACCOUNTS_20110309 p 
  where regexp_like (bar_status,'[[^:digit:]]+');

The above query doesnt return any rows. 上面的查询不会返回任何行。

尝试这个:

where bar_status like '%[^0-9]%'

Try (I can't test it) 试试(我无法测试)

select * from XXX_ACCOUNTS_20110309 p 
where not regexp_like (bar_status,'[[:digit:]]+');

or 要么

select * from XXX_ACCOUNTS_20110309 p 
where not regexp_like (bar_status,'^[[:digit:]]+$');

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Oracle SQL查询返回的行值(如果所有行在按另一列分组后在列中都有某个值) - Oracle SQL query to return row values if all rows have some value in column after grouping by another column SQL 查询以获取循环计数,如果它与连续行中的列值匹配 - SQL Query to get count of cycles if it matches value of column in consecutive rows sql查询根据匹配的列返回单个值 - sql query to return single value based on column it matches SQL - 返回具有最多列匹配的行 - SQL - Return rows with most column matches SQL查询返回另一个表中不匹配的行 - SQL Query to return rows with no matches in another table SQL查询具有多于一列重复一个值的行 - SQL query for rows having one value repeated in more then one column Oracle SQL为那些当前为该列具有空值的行为特定列生成随机唯一值 - Oracle SQL to generate Random unique values for specific column for those rows which are currently having null value for that column SQL查询以查找其中1列的值与另一行的另一列匹配的行 - SQL query to find rows where 1 column value matches another column on another row SQL查询为列中具有相同值的每个条目返回3行? - Sql Query to return 3 rows for every entry with the same value in column? SQL查询返回列值多次出现的行 - SQL Query to return rows where a column value appears multiple time
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM