> CREATE OR REPLACE FUNCTION FACTORIAL_1(factstr varchar2
)
2 RETURN NUMBER AS
3 new_str VARCHAR2(4000) := factstr||'*' ;
4 fact number := 1 ;
5 BEGIN
6
7 WHILE new_str IS NOT NULL
8 LOOP
9 fact := fact *
TO_NUMBER(SUBSTR(new_str,1,INSTR(new_str,'*')-1));
10 new_str := substr(
new_str,INSTR(new_str,'*')+1);
11 END LOOP;
12
13 RETURN fact;
14
15 END;
explanation Above program?
No Answer is Posted For this Question
Be the First to Post Answer
What is Rollback Segment ?
What is a Database instance ? Explain?
in account table account type amount ac1 credit 300 ac2 debit 5000 ac3 credit 3000 ac1 debit 4000 ac3 debit 2000 ac2 credit 4000 write a query how to get sum of credit & sum of debit
How to select all columns of all rows from a table in oracle?
What are the factors that affect OPTIMIZER in choosing an Optimization approach ?
How to write a left outer join with the where clause in oracle?
Explain oracle’s system global area (sga).
In the oracle version 9.3.0.5.0, what does each number shows?
How do I recompile a procedure in oracle?
Is it possible to split the print reviewer into more than one region ?
How to define a specific record type?
What is the difference between substr and instr?