How to display all Friday's in a year with date?

Answer Posted / kuldeep

select * from
(

SELECT (TRUNC (SYSDATE, 'yyyy') + LEVEL - 1) dt,
TRIM(TO_CHAR ((TRUNC (SYSDATE, 'yyyy') + LEVEL - 1), 'Day')) dy
FROM DUAL
CONNECT BY LEVEL <= 365

)
where dy='Friday'

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the packages in pl sql?

560


how can we know the number of days between two given dates using mysql? : Sql dba

533


How to test for null values?

590


Is a secondary key the same as a foreign key?

480


If the application is running very slow? At what points you need to go about the database in order to improve the performance?

555






what is the use of set statement in tsql? : Transact sql

515


Which is the correct statement about truncate and delete?

517


Why use triggers in sql?

485


What is the maximum number of triggers, you can apply on a single table?

526


How do I start sql from command line?

516


Is sql dba a good career? : SQL DBA

519


Does sql require a server?

519


can a stored procedure call itself or recursive stored procedure? : Sql dba

566


How many triggers can be applied to a table?

585


is mysql query is case sensitive? : Sql dba

549