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 table? : Sql dba
What do you mean by field in sql?
how to concatenate two character strings? : Sql dba
Explain how exception handling is done in advance pl/sql?
What is cold data?
How do I filter in sql profiler?
How to get list of all tables from a database?
What is dynamic query?
What are reports usually used for?
explain normalization concept? : Sql dba
how to fetch common records from two tables? : Sql dba
how do you know the version of your mysql server? : Sql dba
What is the difference among union, minus and intersect?
What will you get by the cursor attribute sql%notfound?
How to know the last executed procedure?