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
How to avoid duplicate records in a query?
What is difference between rank () row_number () and dense_rank () in sql?
What are the features of pl sql?
Is pl sql a scripting language?
how to include comments in sql statements? : Sql dba
What are the sql commands?
what happens when the column is set to auto increment and you reach the maximum value for that table? : Sql dba
Which join is like inner join?
How can you fetch common records from two tables?
how many ways to get the current time? : Sql dba
how to start mysql server? : Sql dba
What is meant by user defined function?
What is online transaction processing (oltp)?
What is sql scripting?
What is a sql instance vs database?