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
How to sort the query output in oracle?
What are the differences between date and timestamp in oracle?
State any two functions of oracle?
Can select statements be used on views in oracle?
How to grant create session privilege to a user in oracle?
What is the Tune Query
Can we protect our pl/sql source code?
Assuming today is Monday, how would you use the DBMS_JOB package to schedule the execution of a given procedure owned by SCOTT to start Wednesday at 9AM and to run subsequently every other day at 2AM.
what are the advantages of running a database in archive log mode?
How to create id with auto_increment on oracle?
How do we get field detail of a table?
How to update values on multiple rows in oracle?
How to define an anonymous procedure without variables?
What is the difference between count (*), count (expression), count (distinct expression)?
How to recover a dropped table in oracle?