[英]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.