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

Answer Posted / ranjan

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 <= (SYSDATE - TO_DATE('01-JAN-2016','DD-MON-YYYY')+1)
)
WHERE TO_CHAR(C_DATE,'DY') = 'FRI'

Is This Answer Correct ?    11 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to use group functions in the select clause using oracle?

587


What is oracle rowcount?

564


What privilege is needed for a user to create indexes in oracle?

564


What is oracle database 10g express edition?

587


What are the various oracle database objects?

667






How to define a data source name (dsn) in odbc manager?

521


How to delete multiple rows from a table in oracle?

551


What is proxy method?

534


How to do paging with oracle?

565


How can you merge two tables in oracle?

561


Can we use oracle pl/sql block in core java? if so how? pls get back to me .....

2498


How would you best determine why your MVIEW couldnt FAST REFRESH?

1428


How to define default values for formal parameters?

584


What is flashback in Oracle?

575


How to do clean up if create database failed?

566