I would like to create a query where I select all records which contain characters that are not a-z or A-Z
so something like this
SELECT * FROM mytable
Something like
select *
from foo
where regexp_like( col1, '[^[:alpha:]]' ) ;
should work
SQL> create table foo( col1 varchar2(100) );
Table created.
SQL> insert into foo values( 'abc' );
1 row created.
SQL> insert into foo values( 'abc123' );
1 row created.
SQL> insert into foo values( 'def' );
1 row created.
SQL> select *
2 from foo
3 where regexp_like( col1, '[^[:alpha:]]' ) ;
COL1
--------------------------------------------------------------------------------
abc123
The ^
negates a character class:
SELECT * FROM mytable WHERE REGEXP_LIKE(column_1, '[^A-Za-z]')
if you want that not contains any of a-z and A-Z:
SELECT * FROM mytable WHERE NOT REGEXP_LIKE(column_1, '[A-Za-z]')
something like:
"98763045098" or "!%436%$7%$*#"
or other languages like persian, arabic and ... like this:
"خلیج فارس"
Try this:
select * from T_PARTNER
where C_DISTRIBUTOR_TYPE_ID = 6 and
translate(C_PARTNER_ID, '.1234567890', '.') is null;