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 display all Friday's in a year with date?

Answer Posted / nihar meher

declare
a date;
b date;
c number(15);
begin
select trunc(sysdate,'yyyy') into a from dual;
select add_months(trunc(sysdate,'yyyy'),12)-1 into b from dual;
c:=b-a;
for i in 1..c
loop
if to_char(a,'dy')='fri'
then
dbms_output.put_line(a);
end if;
a:=a+1;
end loop;
end;

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 pl sql script?

975


Where are my tempfiles, I don't see them in v$datafile or dba_data_file?

943


how to calculate expressions with sql statements? : Sql dba

979


What are the types of views in sql?

1037


How would you pass hints to the sql processor?

919


How can we make an if statement within a select statement?

957


What is pl sql commands?

977


Can we use loop in sql?

921


What is an alias command?

1000


What is relationship? How many types of relationship are there?

1068


List the various privileges that a user can grant to another user?

987


Are subqueries faster than joins?

947


Is oracle and sql same?

953


How do I find duplicates in two columns?

1054


Which are sql * plus commands?

1039