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 clustered table in Oracle?

1201


How to define default values for formal parameters?

1051


Explain what are the advantages of views?

1069


How to rename an index?

1076


What are the differences between blob and clob in oracle?

1089


How to add a new column to an existing table in oracle?

1142


What is an anonymous block?

1258


How to do a full database export?

1117


Using the relations and the rules set out in the notes under each relation, write statements to create the two sequence generators specified in the notes.

2119


What is meant by joins?

1063


Explain the difference between replace() and translate() functions in oracle?

1042


What is transport network substrate (tns) in oracle?

1047


State the difference along with examples between Oracle 9i, Oracle 10g and Oracle 11i.

1034


How to drop a tablespace?

1052


What is an oracle transaction?

1150