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 clustered table in Oracle?
How to define default values for formal parameters?
Explain what are the advantages of views?
How to rename an index?
What are the differences between blob and clob in oracle?
How to add a new column to an existing table in oracle?
What is an anonymous block?
How to do a full database export?
Using the relations and the rules set out in the notes under each relation, write statements to create the two sequence generators specified in the notes.
What is meant by joins?
Explain the difference between replace() and translate() functions in oracle?
What is transport network substrate (tns) in oracle?
State the difference along with examples between Oracle 9i, Oracle 10g and Oracle 11i.
How to drop a tablespace?
What is an oracle transaction?