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 is orm in sql?

514


What are different types of keys?

504


What are the disadvantages of not performing database normalization?

569


How do I remove duplicates in two columns?

487


Differentiate between sga and pga.

637






What does plv msg allows you to do?

641


What is interval partition?

524


How to display the records between two range in Oracle SQL Plus?

617


What is rank dense_rank and partition in sql?

521


How to change a value of the field ‘salary’ as 7500 for an employee_name ‘john’ in a table employee_details?

862


What is trigger in sql? Explain

514


What is the cause of mutating table error and how can we solve it?

575


What are the benefits of stored procedures?

512


How does one load ebcdic data? : aql loader

617


Is it possible to read/write files to-and-from PL/SQL?

633