Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is the difference between 10g OEM and 11g OEM?

916


Explain joins in oracle?

976


Explain database link?

1058


Will you be able to store pictures in the database?explain.

924


How can I create database in oracle?

958


What is the maximum number of triggers that can be applied to a single table?

952


What are the various oracle database objects?

1089


What is the recommended interval at which to run statspack snapshots, and why?

2859


What is a server parameter file in oracle?

1000


What are the various types of snapshots ?

970


How to list all user accounts in oracle?

978


Explain the use of grant option in imp command.

955


How to insert a new row into a table in oracle?

1087


What is an oracle transaction?

1048


Is there an oracle sql query that aggregates multiple rows into one row?

930