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 difference between db2 and sql?

721


What are pl/sql packages?

765


what is text? : Sql dba

779


What are the different sql languages?

740


What is prepared statement in sql?

750






Does asenumerable execute the query?

775


What are the two types of exceptions.

824


What is database sql?

708


Hi how to import oracle sequence in Informatica? Please write stored procedure code that will import oracle sequence in Informatica SP transformation as per below scenario Oracle table product list Pro_id, pro_name 101, LED Lights. 102, 20watt CFL Lights. 103, 30 watt CFL lights Now a new flat file with new product list needs to be added to oracle table product list with oracle sequence. flat file product Prono,pro_name, 1, 20 watt tube light 2, 30 watt tube light & target should be like 101, LED Lights. 102, 20watt CFL Lights. 103, 30 watt CFL lights. 104, 20 watt tube light 105, 30 watt tube light thks reg suvarna joshi suvarnaatsuvarna@rediffmail.com

2259


Does mysql_real_escape_string prevent sql injection?

692


What is serial sql?

701


What is the difference between subquery and correlated query?

724


how to enter binary numbers in sql statements? : Sql dba

707


Is it possible for a table to have more than one foreign key?

774


explain the options of myisamchk to improve the performance of a table. : Sql dba

721