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 a oracle database?

1011


What are internal user account in oracle?

960


How to use an explicit cursor without open statements?

1022


How can we find out the duplicate values in an oracle table?

1010


What is translate in oracle?

1060


How to view all columns in an existing table?

896


What do you mean by merge in oracle and how can you merge two tables?

924


Explain rename?

938


What is a server parameter file in oracle?

1021


Explain an index segment?

1066


How to update values on multiple rows in oracle?

994


How do I find the database name in oracle?

1000


How to get execution path reports on query statements?

945


List out the types of joins.

1109


How do I decide when to use right joins/left joins or inner joins or how to determine which table is on which side?

978