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 / dinesh

DECLARE
c date:='01-JAN-15';
d date:='31-DEC-15';
a number(10);
BEGIN
a:=d-c;
FOR i in 1..a
LOOP
IF to_char(c,'DY')='FRI' THEN
DBMS_OUTPUT.PUT_LINE('THIS IS FRIDAY DATE:='|| ' '|| c);
END IF;
c:=c+1;
END loop;
END;

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what are ddl statements in mysql? : Sql dba

1127


Does oracle roll back the transaction on an error?

971


How do I kill a query in postgresql?

1026


What is difference between table and view?

992


what is the difference between group by and order by in sql? : Sql dba

1068


how can you see all indexes defined for a table? : Sql dba

948


What are the most important ddl statements in sql?

1037


Explain the uses of a database trigger?

994


How can we solve sql error: ora-00904: invalid identifier?

1181


How much does sql certification cost?

1026


What is t sql in sql server?

1017


Explain the purpose of %type and %rowtype data types?

884


What is the importance of sqlcode and sqlerrm?

1292


How does sql profiler work?

973


What are the built in functions of sql?

990