How to display all Friday's in a year with date?
Answer Posted / dinesh
DECLARE
c date:='01-JAN-15';
d date:='31-DEC-15';
a number(10);
BEGIN
a:=d-c;
FOR i in 1..a
LOOP
IF to_char(c,'DY')='FRI' THEN
DBMS_OUTPUT.PUT_LINE('THIS IS FRIDAY DATE:='|| ' '|| c);
END IF;
c:=c+1;
END loop;
END;
Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What is bulk compiling in pl/sql.?
Is it possible to include an insert statement on the same table to which the trigger is assigned?
Why do we need sharding?
what is view? : Sql dba
How does sql*loader handles newline characters in a record? : aql loader
What are the advantages of sql?
What are the types of join and explain each?
How do you know if a relationship is 2nf?
What is the advantage of index in sql?
Can a table have no primary key?
What is the difference between sql and isql*plus?
What is the difference between stored procedure and view?
What is sql used for?
What are the types of records?
What is sql comments?