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


Please Help Members By Posting Answers For Below Questions

What are triggers in sql?

578


Is not equal in sql?

562


What is the best sql course?

532


What are the differences between implicit and explicit cursors?

517


what is an alias command? : Sql dba

544






What are triggers and its types?

549


What are basic techniques of indexing?

842


What is the difference between an inner join and an outer join?

512


How many sql databases can you have on one server?

590


What do you mean by rowid?

538


How exception is different from error?

539


Is merge a dml statement?

520


what is index? : Sql dba

556


What is sql lookup?

511


What are the types of records?

526