Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to find the count of letter "L" in HELLO

Answer Posted / dinesh

// in SQL:------------------------------------------
Select length('hello')-length(replace('hello','l','')) From
DUAL;

// IN PL/SQL:-------------------------------------------

create or replace Procedure count_char(name varchar2,c varchar2) IS
m number(11):=0;
d number(11);
a number(11);
b number(11):=1;
BEGIN
a:=length(name);
for i in 1..a
LOOP
IF INSTR(NAME,c,b)>=1 THEN
d:=INSTR(NAME,c,b);
m:=m+1;
b:=d;
END IF;
b:=b+1;
END LOOP;
DBMS_OUTPUT.PUT_LINE('count of '||' '||c ||' '||'is'||' '|| m||' '||'in'||' '||name);
end;

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are inner and outer joins examples of both?

1010


What is snowflake sql?

1130


how to show all tables with 'mysql'? : Sql dba

1159


what is data manipulation language? : Sql dba

1071


what is online transaction processing (oltp)? : Sql dba

1041


what is a constraint? Tell me about its various levels. : Sql dba

1049


What does trigger mean in psychology?

1009


How delete all data from all tables in sql?

986


What is sql lookup?

974


What are the uses of merge?

1228


Can we perform dml on view?

1118


How do I run a sql query?

1083


how many triggers are allowed in mysql table? : Sql dba

1107


How can you save or place your msg in a table?

1042


how to check server status with 'mysqladmin'? : Sql dba

1134