I need to count the number of rows returned by REGEXP_LIKE() in oracle. how do I do that? I have tried the following query in a function:
RETURN COUNT(REGEXP_LIKE(SIN, '^(-|\\+){0,1}([0-9]+\\.[0-9]*|[0-9]*\\.[0-9]+|[0-9]+)$'));
I need to count the number of rows returned by REGEXP_LIKE() in oracle. how do I do that? I have tried the following query in a function:
RETURN COUNT(REGEXP_LIKE(SIN, '^(-|\\+){0,1}([0-9]+\\.[0-9]*|[0-9]*\\.[0-9]+|[0-9]+)$'));
Use regexp_count(https://docs.oracle.com/cd/B28359_01/server.111/b28286/functions135.htm) instead of REGEXP_LIKE
SELECT COUNT(*) INTO sin_count FROM your_tbl WHERE REGEXP_LIKE(
SIN, '^(-|\+){0,1}([0-9]+\.[0-9]|[0-9]\.[0-9]+|[0-9]+)$');