Here is generic function in Pl-Sql which will return the count of specific characters in a given string,
function numChars(instring varchar2, inpattern varchar2) return number is
counter number;
next_index number;
string varchar2(2000);
pattern varchar2(2000);
begin
counter := 0;
next_index := 1;
string := lower(instring);
pattern := lower(inpattern);
for i in 1 .. length(string) loop
if (length(pattern) <= length(string) - next_index + 1) and
(substr(string, next_index, length(pattern)) = pattern) then
counter := counter + 1;
end if;
next_index := next_index + 1;
end loop;
return counter;
end;
Subscribe to:
Post Comments (Atom)
SpringBoot: Features: SpringApplication
Below are a few SpringBoot features corresponding to SpringApplication StartUp Logging · To add additional logging during startup...
-
There was a requirement in which user should be able to download an excel report from application, make some amendments and upload the exce...
-
I was facing 'java.rmi.NoSuchObjectException: Bean has been deleted' for the stateful bean instance. While reading about the error, ...
-
What Is a WebLogic Server Cluster? A WebLogic Server cluster consists of multiple WebLogic Server server instances running simultaneously an...
No comments:
Post a Comment