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 SAVE POINT ?
what is difference between table and view? where to use views? thanks in advance!
What is oracle in java?
Is it possible to disable the parameter from while running the report ?
material view and view disadvantages?
What is Database Link ?
 What are the oracle DML commands possible through an update strategy?
i have a table with 1 lac of data.i want to insert this data into another table. i want every 5000 of data insert use a commit.using counter and if error is comming in the 5000 of data it rollback.
Hi Masters, in Oracle Applications 11i, we hace 2 functions using the same form, i need to create 1 personalization, but that code must afect only one function.... how can i do that?
How do I escape a reserved word in oracle?
What is the difference between I and G in Oracle?
what is analyze command ? what kind of statistics does it generate?