In PLSQL there are functions like INSTR, SUBSTR, REPLACE, but
to Count number of occurrences of a character in the string there is no standard function.
Here is a simple way, In the example below I am trying to find out the number of
occurrence of '|' in the string
select length('san|tom|elp|ert|') -
length(replace('san|tom|elp|ert|','|')) count from dual;
to Count number of occurrences of a character in the string there is no standard function.
Here is a simple way, In the example below I am trying to find out the number of
occurrence of '|' in the string
select length('san|tom|elp|ert|') -
length(replace('san|tom|elp|ert|','|')) count from dual;
No comments:
Post a Comment