How to find no of saturdays in a month using single sql ?
Answer Posted / nagaraju
select count(*) from (
select trunc(to_date(sysdate,'DD/MM/rrrr'),'mm') +rownum -1 dates
from dual connect by level <=Add_Months(trunc(to_date(sysdate,'DD/MM/rrrr'),'mm'),1) - trunc(to_date(sysdate,'DD/MM/rrrr'),'mm')
)
where
to_char(dates,'DY')='SAT'
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the difference between 10g OEM and 11g OEM?
Explain joins in oracle?
Explain database link?
Will you be able to store pictures in the database?explain.
How can I create database in oracle?
What is the maximum number of triggers that can be applied to a single table?
What are the various oracle database objects?
What is the recommended interval at which to run statspack snapshots, and why?
What is a server parameter file in oracle?
What are the various types of snapshots ?
How to list all user accounts in oracle?
Explain the use of grant option in imp command.
How to insert a new row into a table in oracle?
What is an oracle transaction?
Is there an oracle sql query that aggregates multiple rows into one row?