How to find no of saturdays in a month using single sql ?
Answer Posted / anuradha
Select Count(*)
From (Select Trunc(To_Date('20120305', 'yyyymmdd'), 'MM')
+ Rownum - 1 Dates
From (Select 1 From Dual Group By Cube(2, 2, 2,
2, 2))
Where Rownum <=
Add_Months(Trunc(To_Date
('20120305', 'YYYYMMDD'), 'MM'), 1) -
Trunc(To_Date('20120305', 'YYYYMMDD'), 'MM'))
Where To_Char(Dates, 'DY') In ('SAT');
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Explain the use of Merge statement in oracle 11g
How can windows applications connect to oracle servers?
Explain what are the uses of rollback segment?
Describe an oracle table?
when we are importing items in inventory, showing errors, Oracle support suggested us for running scripts & also suggested if we run scripts, iprocurement applicaation if is there it will show shared and if we go in future for iprocurement, it wont work. So kinldy suggest any functional solution.
What is an oracle and why it is used?
How do I uninstall oracle 11g?
i wrote a pl/sql procedure. it must run every sunday 4.40 How can i schedule it with the help of dbms_jobs (or another other procedure with out creating bat file,exe file)
Is there any function in oracle similar like group_concat of mysql?
What are the differences between date and timestamp in oracle?
What is backup in Oracle?
What the is the diff between local index and global index. give some example.
What is a nested table?
How to speed up webrick?
What is Reduced List of Values?