write a query that displays every Friday in a year with date?

Answer Posted / sivareddy

SELECT C_DATE, TO_CHAR(C_DATE,'DY')
FROM
(
SELECT TO_DATE('01-JAN-2016','DD-MON-YYYY')+LEVEL-1 C_DATE
FROM DUAL
CONNECT BY LEVEL <= to_date('31-dec-2016','dd-mon-yyyy') - TO_DATE('01-JAN-2016','DD-MON-YYYY')+1)
WHERE TO_CHAR(C_DATE,'DY') = 'FRI'
/

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to call a stored function in oracle?

572


What language does oracle use?

590


How to convert times to characters in oracle?

599


How to use an explicit cursor without open statements?

607


Explain do view contain data?

574






How to delete an existing row from a table in oracle?

637


Please explain joins in oracle?

544


What is a connect identifier?

536


How to load excel data sheet to oracle database

581


is there a tool to trace queries, like profiler for sql server?

586


Difference between hot backup vs. Cold backup?

602


What is the maximum limit on the number of columns in a table?

545


Design database draw er diagram for a certain scenario ?

4095


How to write date and time interval literals in oracle?

563


How to define an anonymous block?

611