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
How to write date and time interval literals in oracle?
How to pass parameters to procedures in oracle?
How to declare a local variable?
what is reindexing?
What privilege is needed for a user to query tables in another schema?
How to define a variable to match a table column data type?
What is Segment Advisor in Oracle?
Explain the use of consistent option in exp command.
How to delete an existing row from a table in oracle?
What is PL/SQL ?
Can we call procedure inside function in oracle?
What happens if you set the sga too low in oracle?
Explain the use of indexes option in exp command.
1) Does oracle have any table which contain all the exceptions and it's code internally?
Point out the difference between user tables and data dictionary?