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 a oracle database?
What are internal user account in oracle?
How to use an explicit cursor without open statements?
How can we find out the duplicate values in an oracle table?
What is translate in oracle?
How to view all columns in an existing table?
What do you mean by merge in oracle and how can you merge two tables?
Explain rename?
What is a server parameter file in oracle?
Explain an index segment?
How to update values on multiple rows in oracle?
How do I find the database name in oracle?
How to get execution path reports on query statements?
List out the types of joins.
How do I decide when to use right joins/left joins or inner joins or how to determine which table is on which side?