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

Mention what is the use of function "module procedure" in pl/sql?

1023


Is sql better than excel?

1082


how to get @@error and @@rowcount at the same time? : Sql dba

986


What are %type and %rowtype for?

1024


How global cursor can be declare with dynamic trigger ?

2163


What is coalesce in sql?

999


Can a primary key be a foreign key?

983


How many sql statements are used? Define them.

998


what is a trigger in mysql? Define different types of trigger. : Sql dba

1028


What is optimistic concurrency control? : Transact sql

958


What are all ddl commands?

1033


What are the different schemas objects that can be created using pl/sql?

986


What is a primary key sql?

1012


What is the difference between function and procedure in pl/sql?

1032


What is a subquery in sql?

991