tags:

views:

224

answers:

1

is there an oracle equivalent of patindex? from my search, the only function that is close to patindex is oracle's instr function but it does not support wild card.

what is the oracle equivalent of the following query?

select patindex('%[^0]%','00194505022') 

edit: i found out regexp_instr have the similar function as patindex.

+3  A: 

There's regexp_instr that uses standard regular expression syntax for pattern matching.

select regexp_instr('00194505022','[^0].*') from dual;
Gary