How to display all Friday's in a year with date?
Answer Posted / dinesh
CREATE OR REPLACE PROCEDURE display_day_date(c date,d date,v varchar2) IS
a number(10);
m date:=c;
BEGIN
a:=d-m;
FOR i in 1..a
LOOP
IF to_char(m,'DY')= v THEN
DBMS_OUTPUT.PUT_LINE('THIS IS'||' '|| v ||' ' || 'DATE for the year '||' '||to_char(m,'yyyy')|| ' '|| m);
END IF;
m:=m+1;
END loop;
END;
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What does bitemporal mean?
What is sqlcontext?
Explain normalization and what are the advantages of it?
Can procedure in package be overloaded?
Why is a trigger used?
Can we use insert statement in function?
What is the use of function "module procedure" in pl/sql?
What is clustered and nonclustered index in sql?
what is meant by nl2br()? : Sql dba
what are the properties and different types of sub-queries? : Sql dba
tell me about various levels of constraint. : Sql dba
What is the difference between join and natural join?
How to return an array from java to pl/sql?
What are the benefits of stored procedures?
What is cursor and why it is required?