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

Give the different types of rollback segments.

1081


How to filter out duplications in the returning rows using oracle?

1068


Difference between open_form and call_form in oracle.

1224


Explain the use of indexes option in imp command.

1264


When do you get a .pll extension in oracle?

1193


How to convert characters to times in oracle?

1071


Explain parameter file in oracle.

1082


What is oracle in java?

1019


How to define and use table alias names in oracle?

993


How to get a create statement for an existing table?

1016


Is it possible to set second Primary Key Constraint in a table in Oracle Database ?

1227


What is the disadvantage of User defind function?

2344


What are the different types of database objects?

1121


How to create a temporary table in oracle?

1335


What is a nested table and how is it different from a normal table?

1112