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
Differentiate between function and procedure in oracle.
What is the use of oracle?
What is a server parameter file in oracle?
Can we save images in a database and if yes, how?
What are the differences between primary key and unique key?
When do you get a .pll extension in oracle?
What do database buffers contain?
What is a trace file and how is it created in oracle?
How to delete an existing row from a table in oracle?
How to define and use table alias names in oracle?
What is the quickest way to fetch the data from a table?
How to create a new table in your schema?
6. Display the client name and order date for all orders using the traditional method.
How to change program global area (pga) in oracle?
What are named parameters?