write a query that displays every Friday in a year with date?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / basanti meher
SELECT A_DATE, TO_CHAR(A_DATE,'DY')
FROM
(
SELECT TO_DATE('01-JAN-2016','DD-MON-YYYY')+LEVEL-1 A_DATE
FROM DUAL
CONNECT BY LEVEL <= (366)
)
WHERE TO_CHAR(A_DATE,'DY') = 'FRI'
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / 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 |
Answer / anish
select distinct next_day((sysdate-level),'FRI') as fir from dual
connect by level <=(sysdate-to_date('01-Jan-2017','dd-mon-yyyy'))
order by 1 asc
| Is This Answer Correct ? | 0 Yes | 1 No |
What is recovery manager(rman) backup in Oracle?
Which dictionary view(s) would you first look at to understand or get a high-level idea of a given Advanced Replication environment?
Explain constraining triggers.
Explain the use of compress option in exp command.
How to fetch the row which has the max value for a column?
What to do if the binary spfile is wrong for the default instance?
you are a universe designer and report developer in BO, what type of information you gather from client?Briefly explain plz
SELECT THE RECORDS FROM 3 TABLES LIKE(T1,T2,T3) AND HOW CAN WE INSERT THAT RECORD IN ANOTHER TABLE LIKE(T4)?
How to sort the query output in oracle?
Can you assign multiple query result rows to a variable?
what is meant by magic query
What are the types of synonyms?